Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This code will not be generated for rules that have the Initialization Only box checked.  Here is an example of a business rule created using the Visual Rule Builder, that makes a Repeat Control visible when a text field starts with a.

Code Block
languagejs
var Text_start_index = Repeat1794.itemAdded ? Repeat1794.itemIndex : 0;
var Text_end_index = Repeat1794.itemAdded ? Text_start_index + 1 : Text.value.length;
var event = form.load;
for (let i = Text_start_index; i < Text_end_index; i++) {
 if (Text[i].value && Text[i].value.startsWith('a')) {
 Repeat1794.visible = true;
 }
}  

The remaining rules listed in this section are not yet supported in the Visual Rules Builder and thus still requires some JavaScript.

...

The Visual Rule Builder will generate code to handle when the user clicks on the Plus icon to add a row (item added event). You should see this code for rules with/without conditions. This code will not be generated for rules that have the Initialization Only box checked.   Here is an example of a business rule with the itemadded event when calculating a Sub Total.

Code Block
languagejs
var Subtotal_start_index = Table290Repeat.itemAdded ? Table290Repeat.itemIndex : 0;
var Subtotal_end_index = Table290Repeat.itemAdded ? Subtotal_start_index + 1 : Subtotal.value.length;
var event = form.load;
for (let i = Subtotal_start_index; i < Subtotal_end_index; i++) {
  Subtotal[i].value = (Price[i].value * Quantity[i].value);
}

Table Column and Cell Properties

...

The database connector REST services can be invoked via a rule. Refer to the  Database Connector chapter for examples of rules using http methods and for configuration details. For an overview of using JSON to dynamically populate dropdown controls click here.
This rule is not yet supported in the Visual Rules Builder and thus still requires some JavaScript.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

var Subtotal_start_index = Table290Repeat.itemAdded ? Table290Repeat.itemIndex : 0;
var Subtotal_end_index = Table290Repeat.itemAdded ? Subtotal_start_index + 1 : Subtotal.value.length;
var event = form.load;
for (let i = Subtotal_start_index; i < Subtotal_end_index; i++) {
  Subtotal[i].value = (Price[i].value * Quantity[i].value);
}