Rules Manager Panel
When a certain condition is met, the actions to be taken are defined in the Rules Manager panel.
The conditions and action rules of the form and the objects on the form, such as changing the property of the same or a different object, assigning a value or issuing a warning, are managed from this panel according to any value.
For example;
- If the value entered in a TextBox object on the form is "XXX", make the CheckBox object on the form selected again,
- Show message when record with value "001" is selected from the ComboBox object on the form,
- If the value of the NumberBox object on the form is greater than 50 and the CheckBox is checked, print some text to the TextBox object on the form, Many such controls can be performed with conditions and actions to be defined in this panel.
From the menu, clicking on "Rules Manager" under the View heading will add the panel to the interface.
The "New Rule" option is actively displayed in the panel. Clicking this option opens the window for defining a new rule.
Rule definition window; It consists of 3 parts: Condition, where the condition or conditions are defined, Action, which determines what action will occur when the defined condition is met, and "Implementation Time", which determines the time frame in which this rule is run.
Clicking the "Add Condition" button creates an "IF" condition in the Condition field. Under this if condition, the operation lines AND – OR can be added by saying "Add Group". Different terms and actions can be defined with the "Else If" or "Else"** groups.
If-Else blocks defined within the same rule are executed sequentially. "Else-If" or "Else" works as the Else statement of the previous If condition.
For each "If", "Else If", and "Else" statement, the corresponding action created in the Action section must be selected, whatever action is intended to occur when the specified condition is met.
Clicking Add Group adds an AND operation to the condition. In the Andean operation, the options "Add Group" and "Add Condition"** are listed.
With the "Add Group" option, new AND – OR operations are created under the same condition. By clicking the AND operation definition, the AND option can be changed to OR.
With the "Add Condition" option, conditions can be added to the corresponding operation.
Clicking the condition row lists the form and the objects that are on the form. When going into the details of the listed objects, the selection of whichever object property is desired to be used as a condition should be made.
For example; To create a condition such as "If the value of TextBox1 is "XXX", the **"TextBox1.value" option must be selected in this field.
The condition options button determines whether the condition value equivalent is compared to a fixed value or to any value of another object on the form.
If Value Entry Condition is selected as an option here, a constant value must be entered for the condition.
If Field Selection Condition is selected as an option, any value of an object in the form can be selected as the condition counterpart. For example; Have two objects on the form, TextBox1 and TextBox2. For a condition such as "If the value of TextBox1 equals the value of TextBox2", this option is selected and the Value value of TextBox2 is selected as the corresponding condition.
Comparison operators for text expressions; "Equal", "Not Equal", "Blank", "Full", "Beginning With", "Ending With", "Contains", and "Not Containing". The comparison operators listed for numeric expressions are; "Equal", "Not Equal", "Blank", "Full", "Large", "Greater Equal", "Less", and "Less Equal".
- "if(TextBox1.Value == "A" &&; NumberBox1.Value == 1)" is specified in the condition as follows.
<
div style={{textAlign: 'center'}}>
<
/div>
- "if(TextBox1.Value == "A" && (TextBox1.Enabled == true || Checkbox1.Value == false))" is specified in the condition as follows.
<
div style={{textAlign: 'center'}}>
<
/div>
When the added conditions are met, the actions to be performed are defined in Actions. By clicking the "New Action" button, actions can be defined with the options "Do Not Show Message", Assign Value by Input" to any value of any object, or "Assign Value by Selection"** to any value of any object, when the relevant condition is met.
<
div style={{textAlign: 'center'}}>
<
/div>
When "Do Not Show Message" is selected as the action;
<
div style={{textAlign: 'center'}}>
<
/div>
- Name : This is the field where the action name is written. Because multiple actions can be defined, the name of the action is specified in this section.
- Message : When the condition is met, the message text to be displayed is written in this field.
- Message Type : This field lists the "Do Not Show Message" and "Confirmation" options. The Do Not Show Message option ensures that the corresponding message text appears on the screen when the condition is met. With the confirmation option, the typed message text is shown in the confirmation window when the condition is met. The confirmation window has OK and Cancel buttons.
- Dialogue Type : This area determines whether the message is displayed on the screen as a Popup, Toaster, or Summary message.
- Alert Type : This field determines the type of message. Success, Error, Warning, and Info options are listed.
Once the defined action is selected in the corresponding condition, it is seen that the action of showing a message occurs when the condition is met in the preview screen or web interface.
For example; When the Checkbox1 object on the form is checked, if a message text is requested to appear, the Condition field checks to see if the value of "CheckBox1.Value" is **"true". In the Action section, the action of showing a message is defined. The defined action is selected in the condition field and then the Save button is pressed.
<
div style={{textAlign: 'center'}}>
<
/div>
When the condition is met, the message text is shown as follows.
When "Assigning Value with Input" is selected as the action;
<
div style={{textAlign: 'center'}}>
<
/div>
- Name : This is the field where the action name is written. Because multiple actions can be defined, the name of the action is specified in this section.
- Target : When the condition specified in the Condition field is met, it may be desirable to assign a value to any property of the form or form objects. The Target section lists the form and all the properties of the objects on the form. The property to which the value is to be assigned must be selected from this field.
- Value : The value to assign is written in this field.
For example; If the value of the NumberBox1 object on the form is greater than 50, let's print the text "Limit Exceeded" to the TextBox1 object on the form. In the Condition field, the condition "If NumberBox1.Value is greater than 50" is defined. In the Action section, type "TextBox1.Value" as the Target and "Limit Exceeded" as the Value. After the defined action is selected in the corresponding condition row, the rule is saved.
<
div style={{textAlign: 'center'}}>
<
/div>
When the condition is met on the preview screen or in the interface, the defined action is seen to occur.
When "Assign Value by Selection" is selected as the action;
<
div style={{textAlign: 'center'}}>
<
/div>
- Name : This is the field where the action name is written. Because multiple actions can be defined, the name of the action is specified in this section.
- Target : When the condition specified in the Condition field is met, it may be desirable to assign a value to any property of the form or form objects. The Target section lists the form and all the properties of the objects on the form. The property to which the value is to be assigned must be selected from this field.
- Value : This field also lists the form and all the properties of the objects on the form. Which property value of which object is desired to be assigned to the target property should be selected from this field.
For example; If the value of the NumberBox1 object is 50, the visibility of the TextBox2 object depends on the selection state of the Checkbox1 object. This means that if Checkbox1 is selected, TextBox2 appears on the form, but not if it is not selected. For such a scenario, the condition is defined as "NumberBox1.Value is 50" in the condition section. In the Action section, select "TextBox2.Visible"** in the Target field and "CheckBox1.Value"** in the Value field. After the defined action is selected in the corresponding condition row, the rule is saved.
<
div style={{textAlign: 'center'}}>
<
/div>
When the condition is met on the preview screen or in the interface, the defined action is seen to occur.
In the field of application time; The options "On Load", "When Changed", and "On Save" are listed. These options are used to determine at what time the written rule is run. "On Load" must be selected as the application time if the authored rule is intended to run as soon as the form is loaded, "When it changes" if it is desired to run when a change is made to the form, or "On Save" if it is desired to run when the form is saved.
Multiple conditions that run at the same application time can be written into a single rule. For multiple conditions to run at different application times, rules that run at different application times must be defined.
Multiple examples of conditions and action definitions in a single rule;