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:

...

Here is the list of available methods for working with dates and times:

  • Time frevvo-  frevvo.currentTime(form) - returns the current time in the user's local timezone. This method should only be used to set the value of a Time control.
  • Date frevvo-  frevvo.currentDate(form) - returns the current date in the user's local timezone. This method should only be used to set the value of a Date control.
  • DateTime frevvo-  frevvo.currentDateTime(form) - returns the current date and time in the user's local timezone. This method should only be used to set the value of a Date/Time control.
  • String DateUtil.Today() - returns today's date in mm/dd/yyyy format

Here is an example of setting a Time control named Tm, a Date control named  Dt and a Date/Time control named DtTm. See the dates and times rule examples for more sample. AnchorRules Examples#DatesandTimesRules Examples#DatesandTimes

Code Block
  Tm.value = frevvo.currentTime(form);
  Dt.value = frevvo.currentDate(form);
  DtTm.value = frevvo.currentDateTime(form);
Note

The When you test a form in . the formTz parameter is automatically appended in the url. Your form will load with the values specified in your rule. However, when you copy the share url, you MUST append the formTz paramater. currentTime(), currentDate() and currentDateTime() will not work in a form.load rule unless you specify a timezone on the form's Url via the _formTz Url parameter. This is because the form server needs to know the timezone in which to return the date and time. If you do not specify a _formTz the methods will return null and the control values will remain blank. The timezone . In v5.0, the parameter syntax is: &_formTz= time zone string. In version 5.1 the parameter syntax is ?_formTz= time zone string. Timezone strings can be found here. For example, to specify Eastern time : &in version 5.1, the syntax would be

?_formTz=America/New_York.

Users, Roles and Tenants Methods

...