Logic Definitions

Logic definitions are reusable defined values that can be used across conditional logic formulas. They provide a central place to manage defined values.

Types of definition

There are three types of definition that can be defined.

Constant

This is a value that you set. It is similar to a Text value. The different between a Constant definition and a Text value is the definition is reusable across all your forms where a Text value is only available where it is setup.

A constant definition can also assist with readability of your logics, instead of setting a text value "AB12" which is difficult to know what its for, you can setup a constant definition with the value "AB12" and give it the name "Finance Department Reference" which helps you to identify what the value is for.

Date Calculation

A date calculation allows you to set a date relative to the current date. Enter a relative date in to the formula field. For example the following are all valid formulas:

  • +10 weekdays
  • -2 weeks
  • next tuesday
  • today
  • Next april 1st

You can optionally choose to include the time with the date by ticking the Include time check box. When Include time is not checked the dates assume a time of 00:00:00 for comparison purposes. Example formulas including the time:

  • today 1pm
  • next april 1st 12pm
  • now

Specific Date

You may have fixed dates for your services such as a subscription or a term start date. Use a Specific Date definition to manage these dates and compare them to Date Calculation definitions.

Creating a definition

Definitions can be created when setting up a conditional logic or in advance from the Logic Definition pages. Both ways are listed here.

From the Logic Definitions pages

  1. Navigate to XForms Pro > Logic Definitions.

  2. Click New Definition

  3. Choose the type of definition.

  4. Give the definition a name.

  5. Set the value/formula as required.

  6. Click Add Definition.

From a conditional logic

  1. Choose Definition as the expression or return type.

  2. Click the drop down list that is shown to the right

  3. Click Create New

  4. Choose the type of definition.

  5. Give the definition a name.

  6. Set the value/formula as required.

  7. Click Add Definition.

Editing a definition

To edit a definition:

  1. Click the name of the definition you want to edit from the list view.

  2. The edit interface will open, make your changes.

  3. Click Save.

  4. The definition will be updated. Any conditional logic using the definition will be automatically be updated to use the updated definition value.

Removing a definition

To remove a definition:

  1. Tick the box of the definition to delete from the list view.

  2. Click Actions and then Delete selected.

  3. Confirm this in the popover that appears.

  4. Your definition will be deleted and you will return to the list view.

It is not possible to delete a definition that is in use on a form. If you attempt to delete a definition that is in use it won't be deleted. You will need to remove it from the forms that are using it before trying to remove it again.

results matching ""

    No results matching ""