Macro to retrieve widget properties

Mark Elliott asked on September 12, 2016 23:10

I've created a widget based off the static text web part. It has 3 properties: Text, Month, and Year. In the Text property I have set the default Value to "This item appeared in the " %insert macro expression to get the value of the month property% of %insert macro expression to get the value of the year property% "issue"

However no matter what macro expression I use I can't seem to access either of those other properties. Any ideas?

Recent Answers


Laura Frese answered on September 13, 2016 02:23 (last edited on September 13, 2016 02:25)

Exactly what macros are you using, can you provide a screenshot?

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on September 13, 2016 08:21 (last edited on December 10, 2019 02:30)

First of all, those macros have to be specified in the configuration of the widget itself (Widgets application) and not in its instance (on Page tab). Second of all, please use the code name of a field to access it:

{%FieldName1.Value|(identity)GlobalAdministrator%}

0 votesVote for this answer Mark as a Correct answer

Mark Elliott answered on September 13, 2016 19:52

I'm trying to place a macro in the default value field of one field in the widget to read the value from one of the other fields (screenshot below)

Image Text

0 votesVote for this answer Mark as a Correct answer

Mark Elliott answered on September 14, 2016 18:32 (last edited on December 10, 2019 02:30)

Well putting in...

This article appeared in {%Month.Value|(identity)GlobalAdministrator%}

gives me nothing for the macro values. Is it not possible to access the values of these fields?

0 votesVote for this answer Mark as a Correct answer

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