Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Live template
templateTypetemplate
templateOption{"label":"StepbyStep Guide cloud ready","value":"961094350477609390","templateType":"template"}
templateTypeOption{"label":"Confluence template/blueprint","value":"template"}
templateId961094350477609390
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 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 a Table Data macro. 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 the Field Name parameter to " tableName ". Change the Type parameter to line . Change the Content Type parameter to text . Inside the empty cell under the " Role " column, create a Text Data macro. Set the Field Name parameter to " tableRole ". Change the Type parameter to line . Change the Content Type parameter to text . You should have a Table Data macro that now looks like this: Now save the page, and click the Edit Contents button so that we can start populating the table we just created with names and roles. This is an example of what we came up with: Once you are done, click Save . Now that we have a table with data, we can use the Get Data macro to retrieve the data and build a sentence using the names and roles from the table. Write the following phrase in the editor under the Table Data macro: " This project has " Immediately after that phrase, create a Get Data macro. 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 the Field Name parameter to " table.0.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 example, table.0.text accesses the first row of table.text . Result
fieldGroupKeys{"si61t55hmx":["net.customware.confluence.plugin.scaffolding__si61t55hmx__data_0_1bo0q659c7"]}

...