Form Outcome Rules
  • Updated on 19 Dec 2014
  • 4 minutes to read
  • Print
  • Dark
    Light

Form Outcome Rules

  • Print
  • Dark
    Light

A form displays controls that allow a user to perform an action, such as enter data, display a report or folder, or manage entities. You can create a flow that, when run, opens a form. It is possible to create a custom Rule that can be used to control Form’s Outcome behavior.

Example:
In this example we will create a Rule that will be used to control our Form’s behavior. Our Rule will create a condition to show Notification when user selects Admin email from the list of emails on the Form .
We begin in the Designer Folder with clicking Create Rule > Create Rule on theFolder Actions panel.

2018-01-02_162800-1024x594.png

Next, we name the Rule and click Create to proceed to the Rule Designer.

2018-01-02_162926-1024x615.png

In the Rule Designer we clickShow Editor link to add new Rule Input Data.
2018-01-02_163109.png

In the Data Definitions dialog, we Name our input, select its Type as Account and check Is List check-box.

2018-01-02_163344.png

Then, we can click Ok to save and close this pop-up window.
Back in the Rule Designer Properties panel, in the Output section we change the Behavior Type to Form Rules.

2018-01-02_163448.png

First, we expand our Rule Input data and select List Of Emails. Click Next to continue.

2018-01-02_163534.png

Here, we expand Text Rules category and select Contains Any . We click Next to proceed…

2018-01-02_163630.png

Finally, we define the Input as, Constant and the value as,admin@decisions.com for the List of Emails . Click Done to complete this Rule Phrase .

2018-01-02_163820.png

Click Close in the top panel to save and close the Rule Designer .
Back in the Designer Folder we click Create Flow button to create a new Flow . We name the Flow and click Create to proceed to the Flow Designer.
2018-01-02_163919-1024x615.png

In the Quick Add for Step , we add GetAll step fromAll Steps [Catalog] > Integration > Internal Services > AccountService category**.**
2018-01-02_164019-1024x768.png

Next, we expand Flows, Rules, Forms and Reports > Forms [Interaction] category and add [Pick or Create Form] step to our Flow .

2018-01-02_164130-1024x768.png

In the resulting pop-up window we click Pick or Create Form link. Then, in the Create New field, we name the Form and click Create to proceed to the Form Designer.

2018-01-02_164228-1024x768.png

In the Form Designer we add Button control from Actions category in the ToolBox . Next, we add Check Box List component from the List category in the ToolBox.

2018-01-02_164410.png

Then, we need to configure this Check Box List component. First, we define List Items Data Name . We useType Picker to select Account Type for this list. Next, define Selected Item Data Name , and use our Button control as an Optional Outcome for this list.

2018-01-02_165335.png

Next, we pick EmailAddress for Display Field option…

2018-01-02_165437.png

To navigate to the Form’s properties we select Explorer on the right panel. In the Explorer we select Surface component and click Properties .

2018-01-02_165544.png

In the Surface Properties we locate Outcome Rules configuration and click Add New link.

2018-01-02_165656.png

In the resulting pop-up window we define Name, Outcome Path, and Triggers for our Rule and click Add New link to configure Rule Data.

2018-01-02_165805.png

In the Add Rules window we provide RuleName and use Rule Picker to select the Rule that we have created previously in this tutorial.

2018-01-02_165853.png

After we picked the Rule we need to configure Inputs to this Rule. Click Update Inputs then click the pencil icon to edit the Inputs .

2018-01-02_165934.png

In the Edit Inputs dialog we select Form Component option from the Input Type drop-down list.
Next, from FormDataName drop-down list we select Selected Accounts which is a data name for the user’s selection from the list of Emails . Then, we can save and close all dialog windows for Outcome Rule configuration. This completes our Form . We can save and close Form Designer to return back to the Flow Designer .

2018-01-02_170052.png

In the Flow Designer, we add Show Popup step from the Favorite Steps category in the Quick Add Step dialog to the AdminEmail outcome from our Form . This outcome from our Form was created with Outcome Rule. In this case we want to show a Notification to the user when theOutcome Rule evaluates True (in other words, when user selects Admin email).

2018-01-03_083646-1024x768.png

In the resulting window we configure Subject and Message for our Show Popup step.

2018-01-03_083827-1024x768.png

We connect Steps in our Flow in the following manner:

2018-01-03_084834.png

Next, we select Edit Input Mappings from Form step options in our Flow . In the Edit Step dialog under Inputs > Accounts we click the Select Value [Form Flow] and choose GetAll_Output to populate the Check List in our Form with all Accounts in the system. Set the Selected Accounts to Ignore .  We can save and close Mapping Editor when finished.

2018-01-03_084700-1024x768.png

This completes our Flow . We can clickDebug link from the top panel in the Flow Designer to test our Flow . Our Form opens in the Debugger and the Check Box List is populated with all Accounts . We can select several Accounts from this List.

2018-01-03_085044-1024x533.png

When we select admin@decisions.com email from this List we trigger ourOutcome Rule . As expected, Notification pops up and our Form resets.

2018-01-03_085126-1024x532.png

Was this article helpful?