Section Repeat Tutorial

Tutorial describing Section Repeat Control usage

Let look at the below example,

Here, I have a Product Info Screen which has a Section Repeat Control (unique_name = section_repeat_control ).
Section Repeat Controls has 3 controls -

  1. Product Dropdown control ( unique_name = product )

  2. Quantity Control (unique_name = quantity)

  3. Price Control (unique_name = price )

Section Repeat control comes with In-Built +More button that on clicking will add the above 3 controls in section repeat.

At the bottom of the Page, Footer consists of 3 controls that acts as a summary -

  1. Total Quantity Control (unique_name = total_quantity)
    Formula (F) = SUM( section_repeat_control.quantity.value)

  2. Total Price (unique_name = total_price)
    Formula (F) = SUM( section_repeat_control.price)

  3. Submit button

Please note - The footer which is at bottom, is outside the Section repeat control and fixed at the bottom.

SUM(section_repeat_control.price)

Let’s understand above Formula (F) - applied in Total Price Control:

  • Formula Evaluation starts from Innermost to the outermost Function.
  • In this case, it will first evaluate - section_repeat_control.price. This will return List (Array) of all the Value’s of Price Control present in Section Repeat Control.
  • Once, we get the Array of all value’s, we pass it to SUM function which is add all the value’s and the final output will be sum of all the values present in all the price control added in Section Repeat.

Now, I need to save all this data into a Sheet. So, I will create a New sheet (Add Sheet option from SHEETS Tab) with name - SectionRepeatTutorial which has following columns added -

  1. ProductName

  2. Quantity

  3. Price

  4. ROWID

  5. SUBMITID

Now, Workflow is added on Submit button which will submit all the data inside section repeat control into Sheets.

Fig1.1

Fig1.2

If there are no tasks added in workflow than on clicking on Workflow Icon, Update Sheet Task will be automatically created and default values will be filled for Fig1.1 screen and it will show Fig1.2 screen and in case a new Update Sheet Task is created by user than it will show Fig1.1 screen .

As shown in above Fig1.2 , we are adding an Update Sheet Task with Insert Record selection into SectionRepeatTutorial Sheet.

For having a separate entry into Sheet for individual section, we need to enable “ITERATE THIS TASK” under TASK ITERATION INFORMATION in Fig1.1 screen and Under GROUP DATA SOURCE add items which you want to be iterated/submitted individually, in this case we have added " ROWID ", " section_repeat_control.product ", " section_repeat_control.quantity.value " and " section_repeat_control.price " as shown in above Fig1.1 . For more information on ROWID and SUBMITID refer this
In case Fig1.2 is opened directly you can go to Fig1.1 using Back button at the top of Fig1.2

Once, workflow is created, Publish the app and open this app in any of the DronaHQ client app - web , android or ios and submit the form to see the data getting saved in the above selected sheets through workflow.

Above image shows how sample data which is submitted and seen in SectionRepeatTutorial Sheet.