HomeUsing LincDoc 3.1+ActionsUsing Rules

11.11. Using Rules

Rules can be used to automatically execute actions based on a condition. For more information about rules and how they work with actions and conditions, see About Rules.

Proceed to one of the following topics for more information about how to use rules in your form:

Creating and Defining a Rule

A rule definition may be attached to a button click or event or even to another rule.  

To add and define a new rule:

  1. Select the arrow button  that corresponds to the desired button, event, or rule row.
  2. Point to add, and click new rule.

    A blank rule definition row appears beneath the selected button, event, or rule. In the following example, a blank rule has been added to the Buttons list.
  3. Edit the new rule as described in Editing a Rule.
  4. Click save to save the updated rule settings.
    Note: To save the rule with a custom name, click save with name. For more information on this option, see Creating Named Rules.

Adding Actions to a Rule

Once a rule has been defined, you need to specify the actions that the rule will control.

Note: You can also add additional rules under a rule. For more information, see Adding Additional Rules to a Rule.

  1. In the Buttons or Events lists, locate the rule to which you want to add actions.
  2. Click the arrow button  that corresponds to the desired button or event.
    Additional options appear.
  3. Click add, and click one of the following options:
    - action. Allows you to add an existing default action, which will be executed if the rule is determined to be true.
    - named action. Allows you to add an existing, named action, which will be executed if the rule is determined to be true.

Adding Additional Rules to a Rule

Once a rule has been defined, you can add additional rules within the rule (nested rules). These rules are only applied if the main (parent) rule is determined to be true.

  1. In the Buttons or Events lists, locate the rule to which you want to add actions.
  2. Click the arrow button  that corresponds to the desired rule.
    Additional options appear.
  3. Click add, and click one of the following options:
    - new rule. Allows you to add a new rule, that you will define (edit) after it is created.
    - named rule. Allows you to add an existing, named rule. 

Editing a Rule

You can edit a rule's condition, which is used to determine whether or not the rule is true and (when true) that the associated actions (or nested rules) are executed. You can also specify if the rule should automatically cancel its execution if an error occurs.

  1. In the Buttons or Events lists, locate the rule you want to edit.
  2. Click the arrow button  that corresponds to the rule.
    Additional options appear.
  3. Click edit.
    The rule's dialog box appears.
  4. If you want the rule to automatically stop its execution if an error occurs, verify that the Stop on error check box is selected.
  5. Specify the condition the rule will use to determine whether or not the rule is true. You can either:
    - Select a default condition from the Condition drop-down list (such as Always or Never).
    - Select a user-created condition from the Condition drop-down list.
    - Click the arrow button  adjacent to the Condition drop-down list, and create a new condition, edit the selected condition, or delete the selected condition.
    For more information on creating and editing conditions, see Configuring Conditions.
  6. Once you have specified your condition, click save.
    Note: To save the rule with a custom name, click save with name. For more information on this option, see Creating Named Rules. 

Deleting a Rule 

You can remove a rule at any time, if you determine it is no longer needed in your form.

Important: If the rule is a named rule, it is only removed from the button or event to which it is associated. It is still available for use. For more information, see Creating Named Rules.

  1. In the Buttons or Events lists, locate the rule you want to delete.
  2. Click the arrow button  that corresponds to the rule.
    Additional options appear.
  3. Click delete.
    The rule is removed.

Creating Named Rules

A named rule has been assigned a unique name through the save with name option on its attributes. Once named, the rule definition is available for reuse on other buttons, events, or rules.

  1. Create a new rule as described in Creating a Defined Rule.
  2. On the rule's edit dialog box, click the save with name option.

    The Save name dialog box appears.
  3. Type a unique name for the action in the Name text box.
  4. Click save.
    Your rule is now available from the named rule menu, and can be used on multiple button, events, or other rules. 

This page was: Helpful | Not Helpful