Help Center>Foundation Help

Applies to:

  • Winshuttle Foundation

Types of rules

There are 4 basic types of rules in Winshuttle Composer: Validation, Formatting, Action, and JavaScript (see the JavaScript reference guide for more information about JavaScript rules.)

Each type of rule is also governed by a common set of General Properties.

On this page

General rule properties

Back to top

 

Winshuttle Composer Create Rule screen

Run Rule on Form Load
Indicates whether or not the rule should be executed immediately when the form is loaded.

Halt Execution in Debugger Before running this rule

This option is good for troubleshooting rules. Enabling this option inserts a debug breakpoint into the javascript code just prior to executing the rule. If the browser Development Tools are active and this rule is executed, the browser debugging session will stop just prior to executing the rule for further interrogation of the code.

Disable Rule

Enabling this option stops the rule from running when the form is run.

Type
Specify the type of rule to create. Additional options will be displayed depending on the type of rule selected. Click a rule type for more information:

Condition
If the specified condition condition is true this rule will be run, otherwise it will not run.

Note: If you use a condition to compare against a SharePoint Yes/No column:

  • The value must be True or False (without quotation marks, etc.)
  • The first letter must be capitalized, i.e. True or False, not true/false

Validation rules

Back to top

A Validation Rule can be used to display an error message when data entered into a form field is invalid. You can specify the conditions under which the error message is displayed.

For example, you could create a rule to display an error if a number entered into a field is greater than a certain value, less than a certain value, or both.

  • Label: A descriptive label for the rule.
  • Run rule on form load: Check this to run the rule when the form is first loaded.
  • Condition: Click to open the Rule Condition creator to define conditions under which the rule comes into effect. Conditions can be basic value comparisons or involve complex formulas.
  • Type: The type of rule.
  • Error Message: The error message text you would like displayed when the conditions you have defined are met.
  • Use Popup: Displays a dialog box with the Validation Message instead of highlighting the error on the form.
    Note:  This option is used to only display a message. The rule will not be validated prior to submitting the form.
  • Popup Title: The title for the Popup box.

Formatting rules

Back to top

Formatting rules apply specific formatting to a form field when certain conditions are met.

For example, if the value entered into a form field is too high, you can create a rule to change the form field to the color yellow.

  • Label: A descriptive label for the rule.
  • Run rule on form load: Check this to run the rule when the form is first loaded.
  • Condition: Click to open the Rule Condition creator to define conditions under which the rule comes into effect. Conditions can be basic value comparisons or involve complex formulas.
  • Type: The type of rule.
  • Apply Styles to Fields: The field to which the formatting will be applied.
  • Formatting options: Font and color options: Bold, Italic, Underline, Striket background and text color.

Formatting Rule box - Composer 11.0.3

Font Style Modifications

Form Component Modifications

Font style modifications (to apply the form component for this field)

  • Bold
  • Italic
  • Underline
  • Strike-through
  • Background Color
  • Text Color

To hide, require, or disable a field, create an Action Rule using Change Field Properties. See the entry for Change Field Properties in the Action Rule quick reference table for more information.

Note: Solutions created in earlier versions of Composer (11.0.2 and earlier) will still display the following options.

  • Hide Component Group: Hide the entire group that contains the field if the condition is true.
  • Hide Component: Hide the field and its labels if the condition is true.
  • Disable this Component: Disable the field if the condition is true.
  • Require Component: Set the field to Required (i.e., the form cannot be submitted if the field is empty) if the condition is true.

New rules created in Composer 11.0.3 and later will need to use the new Action Rule - Change Field Properties as described above.

Action rules

Back to top

Action rules are the most versatile rules. Action rules can perform a wide range of functions, such as setting values in specific fields, comparing values in fields, calculating values based upon formulas, and more.

  • Label: A descriptive label for the rule
  • Run rule on form load: Check this to run the rule when the form is first loaded.
  • Condition: Click to open the Rule Condition creator to define conditions under which the rule comes into effect. Conditions can be basic value comparisons or involve complex formulas.
  • Type: The type of rule.
  • Add: Click to add the rule and open the Add Rule Action dialog box (see below).

Once you have specified the basic information and conditions for an Action rule:

  • Action: Select the action from the drop-down menu. See the Rule Quick Reference Guide for a description of Rule Actions.
  • Field: Select the field that the action will be applied to. You can also type the name of a field to automatically search for it.
  • Value: Type a value, or click f(x) (function) to insert a formula that will be run as part of the action.

Action rule quick reference table

Back to top

The table below provides an overview of available Action Rules, a description of what the rule does, and the parameters associated with the action.

Action

Description

Add New Row

Adds a new row to a repeating table or group.

Parameters

  • Group: The repeating group to which a new row is to be added.

Change Field Properties

Change a field's properties to show, hide, enable / disable, or require / not require input.

Parameters

  • Available options: Show | Hide | Enable | Disable | Required \ Not Required
  • Field: The field to change.

Change Group Display

Shows, Hides, Expands, or Collapses a group based upon a specified field within the group.

Parameters

  • Field Within Group: The Field data governing the display state of the containing group. (Show | Hide | Expand | Collapse)
Copy Like Rows

This rule can be used to copy rows from one repeating table or repeating group to a target repeating table or repeating group.

This rule matches the column value in the source repeating element to determine which rows to copy based upon the selector field property.

The Copy Rows Action determines if the matching rows should be overwritten or added to the target repeating element as new rows.

Delete Row Options

  • Enable: Show the "trashcan" (delete) icon
  • Disable: Hide the "trashcan" (delete) icon

Parameters

  • Group: The repeating group for which to enable/disable Delete Row Options.

Empty Table

Clears all data out of a repeating table or group.

Parameters

  • Group: The repeating group which is to be cleared of all data.

Execute Query

Executes a Query control in the form.

Parameters

  • Query Control: The query to be executed.

Execute Rules for Field

Runs the rule on another field. This can be useful if 2 fields have rules related to one another.

Parameters

  • Field: The field on which to run the rule.

Execute Web Service

Executes a web service control in the form.

Parameters

  • Web Service Control: The web service to be executed.

Filter Repeating Content

Enables the filtering of Repeating Tables/Groups while preserving the content. You can configure a “condition” to use with this -- for example, field1= “this” and field2 != “that”. Only the rows that satisfy the condition(s) will be displayed in the Repeating Table/Group.

Parameters

  • Group: The group to filter based upon the Filter criteria.
  • Filter: Create the filter logic for the dropdown list. For example, you can specify "Is equal to" and a type a specific value, as well as and/or operators.

New Row Options

  • Enable: Show the "Add New Row" link on a Repeating Table/Group
  • Disable: Hide the "Add New Row" link on a Repeating Table/Group

Parameters

  • Group: The repeating group for which to enable/disable New Row Options.

Reload Drop Down Options

Causes the options of a drop down list or Combo box to be reloaded. This may be used for dynamic options lists.

Parameters

  • Field: The drop down field in which the options will be reloaded.

Render Map

Sends a new address to a map control on the form.

Parameters

  • Map Element: The map control to update with a new address.
  • Description: The description to assign to the map location.
  • Address: The address of the new map location.
  • City: The city of the new map location.
  • State: The state of the new map location.
  • Postal Code: The postal code of the new map location.
  • Country: The country of the new map location.

Search Repeating Content

This provides a mechanism to search all fields for a “pattern” (for example, if any field contains “abcd”). In this case all the rows where at least one field contains the pattern will be displayed in the Repeating Table/Group.

Parameters

  • Group: Group name
  • Contains: Field name

Set a Field Value

This action allows you to change the value of a field in the form.

Parameters

  • Field: The target field you want to set the value of.
  • Value: The formula to evaluate to obtain the new value for the field. This may contain other field values, function calls, external data references or constant values.

Set a Label

This rule action is similar to Set a Field Value (above), but will change the Label (or sub-Label) of a Form Element.

Parameters

  • XPath: The Field (selected from a drop down) for which to change the label valueof the form element.
  • Value: The formula to evaluate to obtain the new value for the field. This may contain other field values, function calls, external data references or constant values
  • Sub-Labels (True/False): Set to True to change the Sub-label of the specified element.

Show Message

This displays a pop up box with the message text specified in the rule. The properties on this rule are derived from a form's fields by default.

Sort Repeating Content

Sort the items in a repeating table.

Parameters

  • Field within group: The field in the repeating content to sort by.
  • Sort Order: Ascending or Descending
  • Persist: Set to True so the data remains sorted between different views. Set to false so the data does not remain sorted between different views.

Submit Form

This action allows you to simulate the Submit button of the form.

Parameters

  • Submit Type: The disposition or type of submit:
  • Complete – Complete the current task.
  • Approve – Complete the current task with Approved disposition.
  • Reject – Complete the current task with Rejected disposition.
  • Save – Save the form but do not start or advance the process.
  • Save and Route – Save the form and start the process.