Versions Compared

Key

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

Business rules are added by editing your form or workflow. Click the Rules button in the form designer toolbar shown below to add new business rules and edit any existing rules in your form.

You may create a new rule by clicking on the icon. Your new rule is given a randomly generated name. You can edit the name as described below.

Each rule has three icons. Each is described below.

  • Click the icon to edit an existing rule. You can edit the name, description and statement (JavaScript code) for the rule.
  • Click the icon to delete a rule. Confirm your choice in the dialog that pops up and the rule will be immediately removed. This is an irreversible process so make sure you do not need the rule before you delete it.

Rules can be temporarily disabled by unchecking the ''enabled''' checkbox visible by opening a rule for edit.

Column
width340px

 On this page:

Table of Contents
maxLevel5

...

  • form.load : This property is true when the form is first loading. It is useful for setting default values via rules that you need to be set before the user starts interacting with the form. This also holds true for flows. This property is true when each step of a workflow is first loading.
  • form.unload : This property is true when users click the form's submit button. It is useful for setting control values just prior to the execution of the form's Doc Actions and Form Actions. This also holds true for flows. This property is true when the user clicks the continue button for each workflow step.
  • form.positionUpdated : This property is used for the Geo location feature. You can fire a rule using this special identifier every time the position is updated.

Examples of identifiers used in  rules are:

...

  • app.id - The unique id associated with a given application. See Sharing Forms
  • app.name - The name of the application
  • form.type.id - The unique id associated with a given form. See Sharing Forms
  • flow.type.id - The unique id associated with a given flow. See Sharing Forms
  • form.id - The unique form instance id. This id is unique for each for submission.
  • form.name - The name of the form
  • flow.id - The unique flow instance id. This id is unique for each flow submission.
  • flow.activity.id - The Id of the current workflow activity
  • flow.activity.name - The name of the current workflow activity
  • form.extid - Client defined extId passed in the formtype Url parameter.
  • flow.extid - Client defined extId passed in the flowtype Url parameter
Position Data

The following data is available when you enable your form's GEO Location feature:

  • position.latitude - Latitude
  • position.longitude - Longitude

  • position.accuracy
  • position.error.message - Error if any, retrieving the GEO Location
  • position.street_number - Street Number
  • position.route - Street Name
  • position.locality - City
  • position.administrative_area_level_1 - State
  • position.administrative_area_level_2  - County
  • position.country - Country
  • position.postal_code - Postal Code
  • position.street_address - Complete street address

Security Subject Information

You can use a form.load rule to pre-populate fields in your form with information about the currently logged in user. For example, if you have controls in your form named Id, FirstName, LastName, Email and Roles, the following rule will prefill those fields as indicated below.

...