Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Live template
templateTypetemplate
templateOption{"label":"StepbyStep Guide cloud ready","value":"477609390","templateType":"template"}
templateTypeOption{"label":"Confluence template/blueprint","value":"template"}
templateId477609390
excerptWith the Set Data macro, Scaffolding can store links to attachments, pages or users. It can also store read-only text, as an alternative to text-data, if you do not require your users to edit forms. Let's store an attachment, page and a sample user, and then retrieve that a link to those items with Get Data . Ingredients Apps Scaffolding Macros Get Data, Set Data Guide This tutorial uses four Set Data macros one to store a link to an attachment one to store a link to a page, one to store a link to a user one to store text Steps create a Set Data macro Name it " storeAttachment " change the Type to " attachment " Now attach a file to the page. For this example, we've uploaded a file called "example.jpg". Within the Set Data macro body type " ^ " and the name of the file (in this case " ^example.jpg ") Add the other Set Data macros create a second  Set Data macro Name  it " storePage " change the  Type  to " content " Within the second macro body type a page name In this example, we've used " SCAF:User Guide ", which is the parent page for this tutorial. create a third  Set Data macro Name  it " storeUser " change the  Type  to " user " Within the third macro type a username from your Confluence instance In this example, we've used the author's username. create the fourth  Set Data macro Name  it " storeText " leave the  Type  to its default (which is " text ") Within the fourth macro body type some text This set of four Set Data macros should be similar to the following macro structure. Now let's retrieve the data that was stored in these Set Data macros. create a Get Data macro for the Field Name , type in the name of whatever Set Data macro you created above, depending on what data you want to retrieve For example, if you want to retrieve the link to the attachment, you would enter " storeAttachment " for Field Name of this Get Data macro. All four macros together display the following or similar.   Notes Make sure there are no blank/white spaces before or after the written link. Result
fieldGroupKeys{"si61t55hmx":["net.customware.confluence.plugin.scaffolding__si61t55hmx__data_0_8zcepdfxnagculxht3l5"]}