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
excerptData stored in table fields created with the Table Data macro can be accessed and displayed with the Get Data macro. In this example, we will create a simple table that stores the names of staff members who are currently involved in a project and also what roles they hold in that project. And then we will use The example then uses two Get Data macros to retrieve data from the table so that we can form a sentence that says: "This project has <STAFF NAME> and their role is <STAFF ROLE>." Ingredients Apps Scaffolding Macros Get Data, Table Data, Text Data Guide Start by creating create a Table Data macro . Set set the Name parameter to " table " . Within the Table Data macro , create a table using the Editor tools like this: Inside the empty cell under the " Name " column , create a Text Data macro . Set set the Field Name parameter to " tableName " . Change change the Type parameter to line . Change change the Content Type parameter to text . Inside the empty cell under the " Role " column , create a Text Data macro . Set set the Field Name parameter to " tableRole " . Change change the Type parameter to line . Change change the Content Type parameter to text . You should now have a Table Data macro that now looks like this: Now save Save the page , and click the On the saved page choose Edit Contents button so that we can start populating the table we just created with names and roles . This is Here’s an example of what we came up with: . Once you are done , click Save . Now that we choose Save We now have a table with data, we . We can use the Get Data macro to retrieve the data and build a sentence using the names and roles from the table. Write In the following phrase in the editor under the Table Data macro : write the following phrase " This project has " Immediately after that phrase , create a Get Data macro . Set set the Field Name parameter to " table.0.tableName " . This means we are calling the " tableName " field name from the first row (" 0 ") in the Table Data macro named " table ". Immediately after that Get Data macro , type in the following phrase : " and their role is " Immediately after that phrase , create a Get Data macro . Set set the Field Name parameter to " table.0.tableRole ". tableRole” This means we are calling the " tableRole " field name from the first row (" 0 ") in the Table Data macro named " table ". You should now have a collection of two Get Data macros that look like this in your Confluence editor: . Save the page and check the results . Notes The first row has a number of 0 . For for example, table.0.text accesses the first row of table.text . Result
fieldGroupKeys{"si61t55hmx":["net.customware.confluence.plugin.scaffolding__si61t55hmx__data_0_1bo0q659c7tx6n5zbbc1"]}