Get value from Pages data type in page types

Ruchira Gamage asked on May 7, 2018 03:11

Hello,

I have a Pages data type as one of the page type fields.

Image Text

But when I try to access it using the Macros like {% JoinPageLink %}, I don't get any values (empty).

I can access rest of the fields in that page type.

Appreciate any help.

Correct Answer

Brenden Kehren answered on May 7, 2018 05:47

My mistake, I didn't see the screenshot before. I'd suggest switching from the Pages form control to a URL Selector control. This way they can select the actual URL. The use the macro like you were before.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on May 7, 2018 04:32 (last edited on December 10, 2019 02:31)

In the page type definition you can use {%EditedObject.JoinPageLink|(identity)GlobalAdministrator%}

0 votesVote for this answer Mark as a Correct answer

Ruchira Gamage answered on May 7, 2018 05:07 (last edited on December 10, 2019 02:31)

Thanks for your reply Brenden. Unfortunately no change. I'm trying to set an HTML attribute like below

<div id="estimate-container" data-title="{% Title %}" data-ruchira="{% EditedObject.JoinPageLink |(identity)GlobalAdministrator%}"></div>

The title comes through. But data-ruchira attribute is still empty. Below is the rendered markup on the browser

<div id="estimate-container" data-title="Estimator" data-ruchira=""></div>

Attached is the picture showing values for the fields

Image Text

0 votesVote for this answer Mark as a Correct answer

Vukasin Andjelic answered on July 11, 2018 16:53 (last edited on December 10, 2019 02:31)

Hi Ruchira Gamage,

you can use macro like this {% CurrentDocument.RelatedDocuments.Any.WithAllData |(identity)GlobalAdministrator%} with this macro you will get data for JoinPageLink field. Page data type creates adHocRelationship, so it is in relationship table this field.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.