Auto Exiting Form Based on Rules
  • Updated on 25 Jul 2014
  • 3 minutes to read
  • Print
  • Dark
    Light

Auto Exiting Form Based on 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 behavior.
Create a new flow in which the form will be placed. In the  Toolbox panel, expand the category  Forms [Interaction] > [Pick or Create Form] , and drag a form to the workspace.
Example
In this example we will create a Rule that will be used to control our Form's behavior. Our Rule will cause the form to Auto Exit when user enters “exit” into the Form's TextBox.

We begin with creating new Rule.
Navigate to the Designer Folder and click Create Rule > Create Rule

2017-12-28_132220.png

Name our Rule and click OK to continue...

2017-12-28_132316.png

First, In the Rule Designer we locate Output section. From Behavior Type dropdown we select Form Rules.

2017-12-28_132357.png

Next, we need to Add Input Data for our Rule ... So we click Add New under Flow Input Data Box .

2017-12-28_132417.png

We name our Data and select its Type of String .
Click Close to save our Input Data.

2017-12-28_132519.png

Next, on the work space we click [add] to Add Condition to our Rule.
In the resulting pop-up window we select our Flow Input Data (Text) and click Next to continue...

2017-12-28_132549.png

From the Text Rules we pick Equals and click Next to continue...

2017-12-28_132610.png

Our string will stay Constant . We define its Value as “exit” and leave Case Insensitive checkbox checked.
Click Done to finish our Condition .

2017-12-28_132634.png

This completes our Rule Step so we can click Close to continue...

2017-12-28_132653.png

This completes our Rule. Save the Rule and close it.
Next, create new Flow by clicking Create Flow in the Designer Folder

2017-12-28_132728.png

Name the Flow and click Create to continue to the Flow Designer.

2017-12-28_132834.png

In the Flow Designer start-up window under  Flows, Rules, Forms and Reports > Forms[Interaction] select  [Pick or Create Form] and click Add to add it to the workspace .

2017-12-28_132920-1024x768.png

From this step's options select Pick or Create Form ... Name the form and click Create to continue.
Drag to the workspace a Label , Textbox and Action Button .

2017-12-28_133207.png

Next, select Surface from the Explorer .

2017-12-28_133334.png

In the Surface's Properties locate Outcome Rules and click Add New to add a new rule that will control our textbox.

2017-12-28_133347.png

In the resulting pop-up window we give our Rule Group Name and name the Outcome Path . Next, we check TextBox1 : Exit checkbox as a Trigger . Click Add to add a Rule to our trigger.

2017-12-28_133537.png

Next we name our Rule and pick our Exit Rule that we created in the first step of this example for this form.

2017-12-28_133835.png

Now we need to Edit our Rule's inputs.. Click Edit .

2017-12-28_133948.png

In the resulting pop-up window change InputType to Form Component . From the FormDataName's dropdown pick our TextBoxe's Name (Text).

2017-12-28_134059.png

Click Ok to save and close all popped-up windows. Save and close our Form. Back in the Flow Designer connect all steps as follow...

2017-12-28_134236.png

This completes our Flow. Save the Flow and click Debug Flow from the top panel of the Flow Designer to test our Form. First in the Debugger enter something into the textbox but “exit”... Mention that the Form's Behavior is standard and we can proceed by clicking our Action Button (Done).

2017-12-28_134353-1024x845.png

Debug Diagram shows us that the Flow were executed with no errors and came to the end step using Done outcome...

2017-12-28_134405.png

Rerun the Flow and this time enter “exit” into the textbox... Mention that as soon as we finish typing “exit” our form auto exits...
The Debug Diagram shows that the flow ran with no errors again but this time it came to the end step on Exit outcome path.

2017-12-28_134433.png

Was this article helpful?