Create Repeater Form Control
  • Updated on 22 Feb 2017
  • 4 minutes to read
  • Print
  • Dark
    Light

Create Repeater Form Control

  • Print
  • Dark
    Light

This tutorial demonstrates how to create and use Repeater Form Control in Decisions 4.0 . Repeater Form Control is custom User Defined control that can be used on any Form as other Form Controls that have input and output data. Repeater Form Control takes in a List of defined Type and outputs edited List of the same Type . Repeater Form Control can be used in cases where user needs to edit/add/remove entities from the List on the Form .
Example:
In this example we are going to create a Repeater Form Control that takes in a List of all Accounts in a System and displays a Text Box for user to be able to edit Email Address . Then, we are going to create a Flow with a Form on it. This Form will display our Repeater Form Control with the ability to Add or Remove Accounts in List .
We begin in the Designer Folder with clicking Create Form > Data Repeater > Base Data Repeater on Folder Actions Panel.
2018-01-15_120952-1024x620.png

Then, we Name our Repeater Control and click CREATE to continue.
2018-01-15_121015.png

Repeater Form Control is basically a Form that can be embedded into other Forms . In the Form Designer we locateForm Data Input Type settings and Pick Account . Click Ok to continue.
2018-01-15_121050.png

Then, we switch our Tool Box to Data tab. In Data tab we expand Form Data . In this example our Form Data is an Account . We locate Email Address property.
2018-01-15_122657.png

Next, we drag our Email Address data to the work-space, define this control to be a Text Box , and click Shift + Enter for designer to automatically create a Label for this Control .
2018-01-15_122608.png

This completes our Repeater Form Control design. We can Save the Form and close Form Designer.
2018-01-15_122806.png

Back in the Designer Folder we click Create Flow on the Folder Actions Panel.
2018-01-15_122834.png

In the resulting window we Name the Flow and click CREATE to proceed to the Flow Designer .
2018-01-15_122954.png

In the Flow Designer we add Get All step from Integrations > All Integrations > Internal Services > Account Service category.
2018-01-15_123107-1024x768.png

On the outcome from Get All step we add Show Form step from Favorite Steps category.
2018-01-15_123154-1024x768.png

Then, we Name the Form and click Create to proceed to the Form Designer.
2018-01-15_123316-1024x768.png

In the Form Designer we expand User Controls > [Existing Controls] > [Current Folder] category in the Tool Box and drag our Repeater Form Control to the work-space.
2018-01-15_123437.png

Our Repeater Control shows on the Form . We also add Button control to our Form for User to be able to submit the Form .
2018-01-15_123743.png

Next, from User Controls category in the Tool Box we add Data Repeater Add Button and Data Repeater Remove Button controls. These button controls allow user to add or remove Entities (in this case Accounts) in the Data Repeater Control input List .
2018-01-15_123717.png

Then, we select and configure our Data Repeater Control on the Form . First, we locate Selection Type settings and pick one of the following:

  • None (no visible selection indicator)
  • Visual Indicator (a marker on the left side of the Repeater Control)
  • Line Number (numerical indicator)

In this example we pick Visual Indicator.
2018-01-15_123811.png

Next, we can adjust our Line Indicator settings:

  • Line Indicator Width
  • Line Indicator Color
  • Line Indicator Selected Color
  • Font For Line Numbers

In this example we keep them default.
2018-01-15_123913.png

Then we locate Input Settings and pick our Add/Remove Buttons for Data Repeater Control.
2018-01-15_124248.png

This completes our Form design. We can save the Form and close Form Designer.
2018-01-15_124307.png

Back in the Flow Designer we select our Show Form step to configure Form Input data. We locate Inputs > Account Data Repeater Data settings. For Mapping Type we use Select Value . Then, using Path Picker we selectGet All_Output outcome data from our Get All step (list of all Accounts in System).
2018-01-15_124432-1024x766.png

Then, we connect the outcome from our Show Form step to the End Step in our Flow . This completes our Flow . We can click Debug Flow on the top panel of the Flow Designer to test our Flow .
2018-01-15_124513.png

Our Form pops up in the Debugger . We can see that our Data Repeater Control is generated for eachAccount Entity passed in. We can use Remove button to remove Accounts from the Input List.
2018-01-15_124749.png

Removed Accounts disappear from our Form .
2018-01-15_124842.png

If we click Add Button , new Repeater Control shows up and new Account Entity is being added to Form Output list*.* In this example we can define an Email Address for the Account that we add to output list. Then, we click Done .
2018-01-15_124913.png

Our Flow runs to the End Step with no issues. We select Show Form step on the execution diagram and click View Output Data.
2018-01-15_125006.png

We should be able to see that our Form outputs a list of Accounts that were displayed on the Form when we submitted it.
2018-01-15_125023.png

Also, the last item in the output list is the Account that we added with Data Repeater Control . This Account has all properties empty except Email Address field that we defined in the Data Repeater Control.
Note: These entities are not automatically saved in the system. The outcome data from the Data Repeater Control lives only within current Flow execution and can be used for further manipulations.
2018-01-15_125050.png

Was this article helpful?