Auto Exiting Form Based on Rules

Last Updated: 07/15/2016 Introduced in Verision: 2.0

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

createRule

Name our Rule and click Create to continue…

nameRule

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

ruleBehavior

 

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

addData

We name our Data and select its Type of String.

addingString

Click Ok to save our Input Data.

saveAddData

Next, on the workspace we click [+] to Add Condition to our Rule.

addCondition

 

In the resulting pop-up window we select our Flow Input Data (Text) and click Next to continue…

pickText

 

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

textEquals

 

Our string will stay Constant. We define its Value as “exit” and leave Case Insensitive checkbox checked.

Click Close to finish our Condition.

ruleDone

 

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

editComplete

This completes our Rule. Save the Rule and close it.

saveRule

Next, create new Flow by clicking Create Flow in the Designer Folder

createFlow

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

nameFlow

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.

flowStarts

 

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.

formDesign

Next, select Surface from the Explorer.

selectSurfaceFromExplorer

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

addOutcomeRule

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.

addRule

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

pickOurRule

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

editRuleInputs

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

ruleInputEditing

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…

connectFlowSteps

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

Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.

3.5 Test Flow Shot

firstDebugTest

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

firstDebugDiagram

Rerun the Flow and this time enter “exit” into the textbox… Mention that as soon as we finish typing “exit” our form auto exits…

secondDebug

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.

secondDebugDiagram

Additional Resources