Sub Dialog Data Flow
  • 18 Mar 2021
  • 3 Minutes to read
  • Dark
    Light

Sub Dialog Data Flow

  • Dark
    Light

Article Summary

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 with 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.

  1. In a Designer Folder, select Create Flow from the bottom action panel.
  2. In the Create Flow dialog, select Default Flow. Name the flow “Main Flow”, select Create.
  3. In the Flow Designer, add a GetAll step from Integration > Internal Services > Account Service.

  4. Add a Show Form step from the Toolbox
  5. Select the Show Form step, in the Properties panel, select PICK OR CREATE FORM.
  6. In the Pick or Create Form dialog, select Create New. Choose Form, name the Form and select CREATE.


  7. In the Form Designer, add a Button to the base of the Form. Name this button, “Submit”.
  8. Add a Data Grid to the Form, from Data > Data Grid in the Form Controlspanel.
    To learn more about Data Grids, navigate to "Displaying Lists of Objects in a Data Grid."


  9. Configure the Data Grid, with the control selected, navigate to the Properties panel.
  10. Under Input Data, choose Account [DecisionsFramework.ServiceLayer.Services.Accounts] as the Type
  11. Type “Account” under Data Name
  12. After the Type is chosen, Column Information > Columns will automatically update with the available fields. Delete all but EmailAddress, FirstName, and LastName.

  13. In the Toolbox, expand Actions > Sub Dialog, drag and drop a Sub Dialog Button next to the “Done” button.
  14. Under Data > Text type “Add New Account” to name the Sub Dialog Button.
  15. Under Input Data select EDIT SUBDIALOG RULE FLOW.

  16. In the Flow Designer, select SETUP INPUT DATA.
  17. 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.

  18. Next, add a Show Form step from the Toolbox.
  19. Select the Show Form step, in the Properties panel, select PICK OR CREATE FORM.
  20. In the Pick or Create Form dialog, select Create New. Choose Form, name the Form and select CREATE.

  21. This form will have three Labels, three corresponding Text Boxes, and two Buttons (Add and Cancel), as shown below. Be sure to name the TextBoxes accordingly (Email Address, First Name, Last Name) to make mapping the following steps easy.
  22. Save and Close the Form.

  23. Add an Add New Account step from Integration > Internal Services > Account Service in the Toolbox on the Add outcome path from the Form.
  24. In the Properties panel under Inputs for account, select Build Data. Select the pencil icon to choose which Properties to map. Choose Email Address, First Name, and Last Name. For each property, choose Select From Flow and choose the matching Text Box.

  25. For member Of select Constant and choose Add New to pick which group the new account will belong to. 
  26. Type in a Constant password that the new account can change after logging in.

  27. Add a Get By ID step from Integration > Internal Services > Account Service in the Toolbox
  28. Under Inputs > id, choose AddNewAccount_Output.


  29. On the outcome of the GetByID step, add an Add Item to List Step from Data > List in the Steps panel.
  30. Under Inputs for New Item, choose Select From Flow and choose GetByID1_Output.
  31. For Original List, select Form Input Data > ListOfAccounts from the Flow. 
  32. On the Outputs of this step, Change Value of New List to Form Input Data > ListOfAccounts will update the old list on the first form to display the newly added account.

  33. Add a Set Control Value step from the Form Rules category in the Toolbox.
  34. Under Inputs > Form Control, select Form Data > Dynamic Data Grid.
  35. Save and close the Subdialog Rule Flow.

Debug

  1. Select Debug in the Flow Designer. Select START DEBUGGING.
  2. The Form displays showing the list of Accounts. Select the Add New Account button.
  3. The Sub Dialog Flow runs and displays the form. Fill in the TextBoxes and select Add.
  4. When the Sub Dialog closes, the Main Form is still displayed and will show the accounts' updated list.

Was this article helpful?