Sub Dialog Data Flow
- 27 Jul 2021
- 4 Minutes to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Sub Dialog Data Flow
- Updated on 27 Jul 2021
- 4 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Sub Dialog Data Flows show a smaller, more targeted informational view of another form component from the parent form. This can extend user interaction while preventing clutter.
Example
This example will display a Form that will have a Data Grid showing a list of all current accounts. There will be two buttons on the Form; one will be a Sub Dialog Button that will create a new account, the second button will close the Form.
- Begin in a Designer Folder, select CREATE FLOW from the bottom action panel.
- In the Create Flow dialog select Default Flow.
- Name the Flow “Main Flow”, select Create.
- In the Flow Designer, add a GetAll step from Integration > Internal Services > Account Service. Name this step "Get All Accounts".
- Next, add a Show Form step from the Steps Panel.
- Navigate to the Properties panel and click Pick or Create Form.
- In the Create or Pick window, name this Form “Show Account Form”, select CREATE.
- In the Form Designer, add a Button to the base of the Form. Name this button “Done”.
- Next, add a Data Grid to the Form, from Data > Data Grid in the Form Controls panel.Please navigate to the Displaying Lists of Objects in a Data Grid article for more information on Data Grids.
- Under Input Data > Type, choose Account [DecisionsFramework.ServiceLayer.Services.Accounts].
- Type “Account” under Data Name.
- After the Type is chosen, Column Information > Columns will automatically update with the available fields. Delete all but EmailAddress, FirstName, and LastName.
- Finally, in the Form Controls panel, expand Actions > Sub Dialog, drag and drop a Sub Dialog Button next to the “Done” button.
- Under Data > Text type “Add New Account” to name the Sub Dialog Button.
- To further configure this button, navigate to Input Data > Flow ID select Create.
- Name the Sub Dialog Flow “Sub Dialog-Add Account”. Click CREATE.
- In the Flow Designer select the Start step. In the Properties panel under Flow Data > Flow Input Data select Show Editor.
- In the Data Definitions dialog name the Input Data “List of Accounts” with the same Type used earlier: Account [DecisionsFramework.ServiceLayer.Services.Accounts].
- Set the Is List to true.
- Next, add a Show Form step from the Steps Panel.
- In the Properties panel, click Pick or Create Form.
- In the Create or Pick window, name this Form “Add New Account Form”, select CREATE.
- In the Form Designer, add three Labels, three corresponding Text Boxes, and two Buttons (Save and Cancel) as shown below. Be sure to name the Text Boxes accordingly (Email Address, First Name, Last Name) to make mapping the following steps easy.
- Save and Close the Form.
- On the Save outcome from the Form, add an Add New Account step from Integration > Internal Services > Account Service in the Steps panel.
- In the Properties panel under Inputs>account select Build Data. Then choose the “...” button to choose which Properties to map. In this example choose Email Address, First Name, and Last Name.
- For each property, choose Select From Flow and choose the matching Text Box.
- For member Of select Constant and choose Add New to pick which group the new account will belong to.
- Then type in a Constant password that the new account can change after logging in.
- On the outcome of the Add New Account step add an Add Item to List Step from Data > List in the Steps panel.
- Under Inputs > New Item select Build Data. Then select the “...” button to choose which Properties to map. In this example choose Email Address, First Name, and Last Name.
- For each property, choose Select From Flow and choose the matching field.
- For Original List select “ListOfAccounts” from the Flow.
- On the Outputs of this step Change Value of New List to New List of Accounts, this will update the old list on the first Form to display the newly added account.
- On the outcome of the Add New Account step, add a Get By ID step from Integration > Internal Services > Account Service in the Steps panel.
- Under Inputs > id, choose AddNewAccount1_Output.
- On the outcome of the GetByID step, add an Add Item to List Step from Data > List in the Steps panel.
- Under Inputs > New Item, choose Select From Flow and choose GetByID1_Output.
- For Original List, select ListOfAccounts from the Flow.
- On the Outputs of this step, Change Value of New List to ListOfAccounts will update the old list on the first Form to display the newly added account.
- Connect the outcome from Add Item to List to the ChangeData step. Under Data > Output select Show Editor.
- In the Data Definitions dialog name the Output Data “Accounts” with the same Type as before: Account [DecisionsFramework.ServiceLayer.Services.Accounts].
- Set the Is List to true.
- Under Inputs for Accounts select List of Accounts from the Flow.
- Save and close to return to the Main Form.
- Back in the Form Designer with the Sub Dialog Button selected, under Flow Data > Flow Inputs select Update Inputs.
- When the Inputs update select the pencil icon next to Flow Inputs > ListOfAccounts.
- For the Input Type choose Form Input Data, type "Account" for the Form Input Name. The Form Input Name should have the same data name as the Data Grid, in this example the Data Grid data name is Account. Select OK to save and close.
- Next, select the pencil icon next to Flow Outputs > Account.
- Under Behavior > Form Data Name type "Account". The Form Data Name should have the same data name as the Data Grid, in this example the Data Grid data name is Account.
- Save and Close the Form Designer.
- In the Main Flow, map the inputs for the Show Form step to the GetAllAccounts_Output.
- Connect the Show Form outcome to the End step.
Debug
- Select Debug in the top action panel.
- Run the debugger; the Form displays showing the list of Accounts. Select the Add New Account button.
- The Sub Dialog Flow runs and displays the form. Fill in the TextBoxes and select Add New Account.
- When the Sub Dialog Flow closes, the Main Form is still displayed and will show the accounts' updated list.
Was this article helpful?