How to Push Data from a Form to a Data Repeater

Last Updated: 10/18/2018 Introduced in Version:

OVERVIEW 

This tutorial demonstrates how to push data from a Form into a Data Repeater Flow. Before working through this first understand how to create a Repeater Form Control. For more information on Data Repeater, Form Controls see attached link; https://documentation.decisions.com/create-repeater-form-control/.  In this example, the Forms have been designed to merge names together using a Join Strings Step to form a full name with a middle initial. These Forms are created as an example of what you can do with a Form that has a Data Repeater embedded within it. 

 

EXAMPLE

Part 1. Create Data Repeater Form and a Data Flow

The first step in creating a Data Repeater that gets Form Data is to start by creating the Data Repeater and then create a Data flow for the Data Repeater.  The Data Repeater has a flow running in the background called Join Strings Flow. In the Designer Folder locate the blue action panel and select Create Form, choose Data Repeater, choose the Repeater Control and select Create. Name the Data Repeater Form and select Create.

 

  1. In the form designer, click off of the Form.  In the properties, tab locate Form Data, define the Input Type for the Data Repeater. Select Pick and choose from a list of Entity or Data Types. For this demonstration choose Account [Decisions Framework.ServiceLayerservics] as the Input Type for the Data Repeater. 

 

2. Design the Data Repeater Form in the form designer. The image below shows a basic Data Repeater Form with two labels, a Drop Down List, and a Textbox. 

 

3. First edit the Drop Down List on the left. Under List Input Source choose Static from the drop down list and input the List Items, A, B, C. 

 

4. Under Output Data and under selected items choose Pick From Data and select MiddleInitial from the selection of form data. 

 

5. Next, edit the Textbox on the right. Under Common Properties and under Data Name choose Pick From Data and select NickName from the selection of Form data. 

   

Transition: Now save and exit the form designer and navigate back to the designer studio. In the next step create a flow for the Data Repeater. 

 

Data Flow: Join Strings

Now its time to create a Data Flow, In this example the data Flow is named Join Strings Flow. From the designer studio select Create Flow located on the blue action panel, choose the flow type and select Create. Name the Flow and select Create.  In the Steps tab locate Data> Text and select the Join Strings step. Drag and drop the step into the Designer Studio and connect the pathways from the Start step to the End step. 1. Navigate to the Start step and set the properties. Under Flow Input Data choose Show Editor and input Data Names. Name the Data, FirstName, MiddleInitial, and LastName, selecting each as string data.

 

 

2. Navigate to the Join Strings step and in the properties tab under separator set the value as Constant and enter an underscore bar. Next, to Source choose Build Array, then choose  Select from Flow and enter the data names.

  • Item 0: FirstName
  • Item 1: MiddleInitial
  • Item 2: LastName  

 

3. Under Output choose Rename and enter the name, JoinStrings_Output. This output name will be used to map the data from the Join strings Flow into the Data Repeater Form when it is put into a main flow. 

 

4. Navigate to the End step and set the properties. Under Output select Show Editor. In Show Editor, create a Data Name called JoinStrings with string as its dataType. Under Inputs and JoinStrings choose Select From Flow. Select from Flow Data the Join Strings_Output string.

 

Edit Data Repeater

  1. Navigate BACK to the Data Repeater Form and open it in the form designer. In the properties tab under Data Flows select (Add New), this is where you will add the Join Strings Flow. Name this Join Name.  Hover over the pencil icon to edit the flow data. 

 

2. Choose the Flow that will run behind the Data Repeater Form. Under Flow, select Pick and select the Join Strings Flow. By selecting Update inputs, the Flow inputs are auto-populated. Select the pencil icon to edit each input String. 

  

 

3. Edit each Flow Input Name:

  • FirstName [String]: The FirstName is defined in the Main Form. Select from the drop down list and choose Form Input Data. The Form Input Name defined as Selected First Name. 
  • LastName [String]: The Last Name is defined in the Main Form in the drop down list and is defined as Selected Last Name. This is the data name from the drop down list with the name Selected Last Name on the Main Form. 
  • Middle Initial [String]: The MiddleInitial does not come from the Main Form. The middle initial input Type is a form component and that comes from the Form Data. Middle Initial. This is defined in the drop down list in the Data Repeater.

     

This completes Part 1. of the Create Data Repeater Form and Data Flow example. Save and close the Data Repeater. 

 

 

Part 2. Create a Form and Main Flow

In this example, we use the Data Repeater Component and two Drop Down List Component. Start by creating a Form, in the Designer Folder locate the blue action panel and select Create Form. Choose from Normal Form, choose the type and select Create and name. In this example, we name this form: DR Form.

  1. Locate in the Steps Tab Drop Down List under Favorites> Drop Down List, drag and drop two onto the Form designer. Finally locate a button component, drag and drop onto the Form. 

 

2. Now set the properties for the Drop Down List components. When you define the drop down list on the left the Output must have a defined Data Name. In this example, we use the Selected First Name as the Data Name. Note: This name needs to match the name set on the Data Repeater Data Flow input.

Drop Down #1. 

 

Drop Down #2. 

When you define the drop down list on the right the Output must have a defined Data Name. In this example, we use Selected Last Name as the Data Name. Note: This name needs to match the name set on the Data Repeater Data Flow input.

 

3. In the Form Designer, design the Form as needed. For this example in the Steps Tab locate User Controls>Data Repeater, drag and drop the Data Repeater Component onto the Form.

 

4. Under Common, Properties select Pick and choose the Data Repeater Form previously created. 

 

5. Pick Data Repeater under Current Folder.

 

6. The Data Repeater Form should appear embedded inside the Form. 

 

Main Form Flow

Creating the Main Form Flow uses the Form and the Data Repeater Form. Start by creating a new flow and name your flow, Main Form Flow.

  1. In the Steps Tab locate Show Form, choose, Forms/Interaction>Pick or Create Form, drag and drop step into Designer Studio. Select Pick and choose Form step, select the previously made custom Form. In this example the Form is named DR Form.

 

2. In the properties tab under Inputs next to Data Repeater Data choose Constant. 

 

3. The Data Repeater Data needs to have an account Type. For this example the Data Name is Test. 

 

 

4. Scrolling down in Settings, give EmailAddress a defined name. In this example the EmailAddress Name is Test.

 

Run The Flow 

Now that the flow is complete, we need to run the flow. You can do this either by selecting Debug in the Flow Designer, or you can close the Flow Designer, right click on the Flow, and select Run Flow.

 

Additional Resources