Create a Maestro Rule

   MaestroThe UI design product.  |   Form Builder |  All versions This feature is related to all versions.

Maestro allows you to add various rules to components so you can implement a desired form functionality.

To create a rule:

  1. Open a Maestro form in the Maestro editor.
  2. Select a component. For a complex components containing multiple fields, select a specific field that must have a rule.
  3. Select the Properties tab and click Create Rule.
  4. Select the type of rule you want to create from the Create Rule dialog.
    Maestro create a new business rule
    Note

    Different type of components, may have different set of rules. For more information, see List of Maestro Rules.

    Note

    You can only create one rule of each type for each component, so if a component has a rule already added, this rule won't be shown in the list of available rules.

  5. Write a JavaScript to implement the rule logic.
  6. Double-click on an item in the tree to insert the field's data reference into the code pane where the cursor is currently located.
  7. Right-click on an item in the tree to bring up the list of rule helpers applicable to that item type. Then select from the list to insert that templated rule code into the source, with the item data reference contained within it. A Rule Helper used to insert code in the rule source is shown below.
  8. Once generated into the rule source, it is only now necessary to place a ! in front of the generated code and the non-empty check code is complete. To illustrate how to insert a data.department text into the JavaScript, double-click the Department field in the tree, so it’s added to the code as shown below.
  9. Click Save.

Edit a Maestro Rule

After the rule is created, you can edit the JavaScript by clicking a corresponding rule, for example, the Mandatory if rule, in the Properties pane, in the Rules section.

Remove a Maestro Rule

Maestro allows you to delete a rule. You may wish to use this functionality when you don't need a rule.

To remove a rule:

  1. Open a Maestro form in the Maestro editor.
  2. Select a component.
  3. Select the Properties tab and expand the Rules section.
  4. Click against a rule to delete and Click OK to confirm it.

Next, learn how to configure a business rule.