View Article

Configure a Form Rule

By Xelence Documentation posted 05-20-2022 16:31

  

Introduction

A form rule is a representation of a rule as a flow chart. It applies logic that makes a decision, performs a calculation, or triggers an action only to that specific form.

In this example, the form rule calculates the total amount of an order at runtime.

Prerequisites

The form must already exist.

Quick Steps
1 Search for and open the maintenance form
2 Open the Form Rules tab and create a new form rule
3 Enter the form rule details and click OK
4 Define any variables
5 Design the rule
6 Compile the rule
7 Save the form

Detailed Steps

Step 1. Search for and open the maintenance form.

This is the form you want to use the rule on. This example uses the Order Maintenance form.


If necessary, add any controls you need to execute the rule. This example requires a Calculated Field control, which uses a custom expression to update the value automatically as the form data changes. The form rule will calculate the total order amount and assign that value to this field.

Drag and drop the Calculated Field control to the column below the data table in the Order Details collapsible control.


Xelence adds the field.


Update the caption for the Calculated Field control.



Step 2. Open the Form Rules tab and create a new form rule.

Open the Form Rules tab.


Click the plus icon to create a new form rule.



Step 3. Enter the form rule details and click OK.

Enter the following properties:

  • Name (ID): This is the form rule's programmatic ID. This property is required. The ID must be unique, and it cannot start with numbers.
  • Description: Optional explanation of the rule.



Step 4. Define any variables.

If the rule uses variables, drag the declaration element to the field and enter the data type, name, and default value (optional) for each variable.



Step 5. Design the rule.

Xelence creates a new form rule with an empty field. You must build the flowchart for the rule by dragging and dropping components from the Toolbox, and configure the components with descriptions (plain text explanation of what the component does) and expressions (business logic).

The form rule can be viewed by an Analyst or a Developer. Write descriptions so an Analyst can trace the rule without expressions.



Step 6. Compile the rule.

You must compile the rule so it can be called. Click the Compile Rule icon to compile the rule.



Step 7. Save the form.


Then, run the Preview. Xelence displays the form output. You can test your updated settings. When you have previewed your form, it should look something like this:


The form rule performs the calculation to find the total order amount and displays the calculated field value when the maintenance form is opened


What are the improvements over S3 Version 6?

This is a new process.


Related Articles

Configure a Calculated Field

Create and Test a Logical Rule with One Condition


This post is part of the Maintenance Form topic. Click here to open the Maintenance Form Overview.


#Xelence

#Forms

0 comments
186 views