Rules provide a generic language to enforce controls in Transaction objects. These rules can be applied in Work Withs as well (remember Transactions will be executed as web services Business Components).
When the insert, update or delete actions are executed from the WWSD Detail, is the Transaction as Business Component what is called. So, those Transaction rules not involving the Web Form will be executed, getting messages into the Messages SDT, that are later processed by the Work With in order to show the corresponding information into the Native Mobile application. For instance:
This rule is triggered when the user taps "Save" on the Transaction. If the condition of the error Rule is true, then a pop-up message like the following will appear.
Disables you to enter a value attribute field, as shown in the image.
This rule assigns values or formulas/expressions to an attribute, for example:
Assigns a default value to an attribute or variable at Insert time.
As shown in the image below, fields are filled upon executing the insert operation.
Adds two attributes if the condition evaluates to True. In the next example below, you have the following rule: "Add(Numeric1,Numeric2);" and, as pictured, numeric2 is disabled.
After tapping on "Save", the rule is executed and adds the value from "Numeric1" to "Numeric2".
Subtracts the value of an attribute from another attribute, depending on a condition. In the example below, you have the rule "Subtract(Numeric1,Numeric2);" and, as pictured, numeric2 is disabled.
After tapping "Save" the rule is executed and subtracts the value from "Numeric1" from "Numeric2".
Calls a GeneXus object, passing attributes/variables as parameters. Parameters may be attributes, variables or constant values.