Using Data Grid Selection in Data Flow
  • Updated on 30 Dec 2016
  • 4 minutes to read
  • Print
  • Dark
    Light

Using Data Grid Selection in Data Flow

  • Print
  • Dark
    Light

This tutorial demonstrates how to dynamically change data on the Form with a simple Data Flow . Data Flows in Decisions are type of “Helper Flows” that may be triggered by some Form events and change data on the Form .
Example:
In this example we are going to create a simple Flow with a Form on it. The Form will have Data Grid component displaying all Accounts in the System . When User changes selection on the Data Grid component we are going to trigger a Data Flow that will be using selected Data Grid row and outputting selected Account’s Email Address on the Form .
We begin in the Designer Folder with clickingCreate New Flow icon on Start Folder View.
2018-01-09_133436-1024x602.png

Then, we Name the Flow and click Ok to proceed to the Flow Designer.
2018-01-09_133550-1024x615.png

As mentioned before, our Flow will have a Form with Data Grid displaying all Accounts in the System . First, we are going to need to getAll Accounts to be available in the Flow . We addGet All step from Integrations > All Integrations > Internal Services > Accounts Service category.
2018-01-09_133650-1024x768.png

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

In the resulting window we Name the Form and click Create to proceed to the Form Designer.
2018-01-09_133738-1024x768.png

In the Form Designer we add Label component that reflects Form title and Button component for User to be able to submit this Form . Then, we add Data Grid component from Data > Data Grid category in the ToolBox .
2018-01-09_133919-1024x540.png

For the Data Grid component we locate Input Settings . In the Input Settings we define Data Name and Pick Account Type .
2018-01-09_134005-1024x540.png

Then, in Column Information Settings we keep desirable Columns from Account type and delete unnecessary. Next, we locateOutput Data Settings and define Grid Mode as SingleSelect . Also, we provide with Data Name our Selected row.
2018-01-09_134243.png

Next, we are going to create our Data Flow . We click outside of our Form’s work-space to switch to the Form’s global settings. Then, we locate Data Flows in theForm Rules section and click Add New.
2018-01-09_134400.png

In theAdd Data Flows window we Name our Flow Data and click Create under Flow Settings .
2018-01-09_134501.png

In the resulting window we Name our Data Flow and click Ok to proceed to the Flow Designer.
2018-01-09_134551.png

In the Flow Designer we select Start Step and in the Flow Data settings we click Add New Flow Input Data.

2018-01-09_134659-1024x540.png

In the Add Flow Input Data window we Name our Input Data and pick Account Type . Then, click CLOSE to save and continue.
2018-01-09_135001-1024x540.png

Our Flow Input Data is defined and we can click Ok to close this window and continue.
2018-01-09_135037-1024x540.png

Then, we connect Start Step and End Step on the work-space, select End Step , and click Add New Data in the Output settings for the End Step.
In the resulting Add Data window we provide Output data name in General Information settings, and pick String Data type in Type Information settings. Then, we click Ok to save and close Add Data window.
Back in the Edit End Step window we locate Inputs settings, pickSelect Value Mapping Type , and using Path Picker select Email Address field from our Account Flow Input Data that we defined on the Start Step in our Flow .
2018-01-09_135037-1024x5401.png

This completes our Data Flow . We can save the Flow and close Flow Designer.
2018-01-09_135112-1024x540.png

Back in the Add Data Flows window we click Update Inputs under Flow Inputs box.
2018-01-09_135128-1024x540.png

selectedAccount Flow Input shows up. We select it and click Edit .
2018-01-09_135219.png

In theEdit Flow Inputs window we pick Form Component Input Type and from theForm Data Name drop-down we pick selectedAccount (this is our Data Grid selected Data Name).
Note: if we pick Form Component Input Type, in the Form Data Name drop-down we will only see Form Components that match our Data Flow Input. In this Example, because our Data Grid displays a collection of Accounts, single row represents one Account; this matches our Data Flow Input that requires single Account Input Data.
When finished, we click Ok to save and close this window.
2018-01-09_135319.png

Then, we pick Dynamic DataGrid: Selection Changed as a Trigger in Advanced settings for our Data Flow. Click Ok to save and close Data Flow definition window.
Finally, we are going to add a dynamic Label to our Form to reflect selected Account’s Email Address . We add Label Component to our Form . Then, in Common Properties for the Label we check Text from Data Name check-box and using Pick From Data link select Flow: selected Account Email Address outcome from our Data Flow.
2018-01-09_135729-1024x540.png

This completes our Form Design . We can save the Form and close Form Designer.
2018-01-09_135832-1024x540.png

Back in the Main Flow Designer we Select Value of the Get All_Output for the Accounts Input to our Form .
2018-01-09_135954-1024x768.png

Then, we connect the outcome from our Form Step to the End Step in our Flow . This completes our Main Flow . We can save the Flow and close Flow Designer.
2018-01-09_140100-1024x540.png

In the Designer Folder we locate a thumbnail for ourMain Flow and click Action > Run Flow on thumbnail’s menu.
2018-01-09_140302-1024x540.png

Our Form pops up… Data Grid component populated with all Accounts in the System . Because first row is selected by default, Label displays ‘admin@decisions.com’ selected Account Email Address .
2018-01-09_140409.png

If we change our selection on the Data Grid component, our Data Flow triggers and changes Label text to reflect selected Account Email Address.
2018-01-09_140449.png

Was this article helpful?