Retrieving Data from Inside a Table or Repeating Section

Let's create a simple table and repeating section then retrieve data from specific rows.

Ingredients

Add-ons

Scaffolding

Platform

Server, Data Center

Macros
Suppliers

Guide


  1. Start by creating a Table Data macro. Give it the name "table".

  2. Inside the Table Data macro, insert a table like this:

    Name
     



  3. Inside the table, create a Text Data macro.
    Give it a Field Name of "tableText".
    Set the Type parameter to "line" and Content Type parameter to "text".
    You should have something like this:




  4. Let's create a repeating section next.
    Create a Repeating Data macro and name it "repeat".

  5. Inside the Repeating Data macro, create a table like this:

    Name 



  6. Inside the table, create a Text Data macro.
    Give it a Field Name of "repeatText".
    Set the Type parameter to "line" and Content Type parameter to "text".
    You should have something like this:




  7. Now let's attempt to grab data from the table.
    Create a Get Data macro.
    For the Field Name, enter "table.0.tableText".
    This means we are grabbing data from the Table Data macro called "table", from the first row ("0"), in the text-data macro called "tableText".
    It should look something like this:




  8. Next, let's create a Get Data macro to grab data from the repeating section.
    For the Field Name, enter "repeat.1.repeatText".

    It should look something like this:




  9. Now save the page and click Edit Contents.

  10. Enter some information and check out the results.


Notes

The first row has a number of 0.

For example, table.0.text accesses the first row of table.text.

Results

Text inside a table

Name

Mario

Luigi

Toad

Text inside a repeating section

Name

Bulbasaur

Name

Squirtle

Name

Charmander

Data from the first row of the table

Mario

Data from the second row of the repeating section

Squirtle