דלגו לתוכן

Dependencies and conditional values

תוכן זה אינו זמין עדיין בשפה שלך.

Dependencies and conditional values make the form react to what is filled in:

  • A dependency changes whether a field is shown, required and editable. For example, show the field “Business license number” only when the client selects “Business” in “Customer type”.
  • A conditional value sets the value of a field. For example, fill “Full name” from “First name” and “Last name”.

Both use conditions on the values of other fields, and are applied again each time a value they depend on changes. Values can also be calculated with the Formula Builder.

To open the settings, select the field and open the Dependencies or the Conditional Values tab of the field editor. See Field settings for the fields that have these tabs.

  1. Open the Dependencies tab of the field.
  2. Click Add Dependency.
  3. Set the permissions that apply when the conditions are met: Show, Required and Edit.
  4. Click Add Condition, and select the field, the operation and the value. See Conditions.
  5. To add more conditions to the same dependency, click Add Condition again.
  6. When the template has a workflow, select the recipients the dependency applies to. See Dependencies in a workflow.

The Dependencies tab of a field with a new dependency: Show, Required, Edit and Add Condition

Setting What it does
Show The field is shown. When you add a dependency, it has the field’s current Show setting.
Required The field must have a value before the form can be submitted. Shown when Show is on. Off by default. A field is required only for people who can edit it, so turn on Edit as well.
Edit The field can be edited. When it’s off, the field is read-only. Shown when Show is on. Off by default.

When you turn off Show, Required and Edit are turned off too.

To delete a dependency or a condition, click its trash icon.

  • All the conditions of a dependency must be true (AND). To apply the same permissions in several cases (OR), add a dependency for each case.
  • The dependencies are checked from top to bottom, and only the first dependency whose conditions are all true is applied. To change the order, drag a dependency by its handle.
  • When no dependency is applied, the field has the permissions set on the Basic and Permissions tab.
  • A dependency without conditions is always applied. The Issues tab warns about it.

For example, to show the field “Business license number” only to business customers, and make it required for them:

  1. In the field’s Basic and Permissions tab, turn off Show.
  2. In the Dependencies tab, click Add Dependency, and turn on Show, Required and Edit.
  3. Click Add Condition. Select the field “Customer type”, the operation Equal and the value “Business”.

When the template has a workflow, each dependency shows buttons for the recipients it applies to:

  • All recipients: when the person button is selected (the default), the dependency applies to all the recipients. Click the X button to select the recipients one by one.
  • One button group for each recipient: select the person button (Recipient can see) to apply the dependency to the recipient, or the X button (Recipient can’t see) to not apply it.

A recipient with Apply repeating model (one recipient for each item of a list in the data model) has a third button, the group button (Recipient group can see):

Button The dependency applies to
Person (Recipient can see) Each recipient of this role, only in the repeated page, section or row that belongs to them.
Group (Recipient group can see) Every recipient of this role, wherever the field is.

A dependency applies only to the recipients that are selected. For other recipients, the field has its permissions under Workflow Permissions.

A control group has its own dependencies, on the Dependency tab of its Group Settings. They apply to all the fields of the group, and work the same way.

The Conditional Values tab has up to three parts:

Part What it does Shown for
Field Clone The field always shows the value of another field. All fields with this tab, except Paragraph.
Default Value The value of the field when the transaction is created. Text, Number, ID Number, Email, Telephone, Date, Text Area, Checkbox. Not shown when Field Clone is set.
Dependent values Values set by conditions while the form is filled in. All fields with this tab. Not available when Field Clone is set.

Use Field Clone when a value is collected once and shown in several places, for example the client’s name on several pages.

In Field Clone, select the field to copy. The list shows the fields of the same type that are not clones themselves. To stop cloning, clear the selection.

A clone is a read-only field (“Clone is a readonly field”). When you set Field Clone:

  • for a List Of Values, the clone gets the list settings of the original field, such as the dictionary and Multi select;
  • the field has no Default Value, no dependent values (“Conditional values are not available for cloned fields”), and no Style or Repeater tab, and most of its Values & Display settings are hidden.

When other fields are clones of this field, you can’t make it a clone. The tab shows “This field value is clone for field … and cannot be used as a clone by it self”, with the names of those fields.

Enter the value the field has when the transaction is created:

  • Text, Number, ID Number, Email, Telephone, Date: type the value, or click the formula button (Edit Formula) to calculate it with the Formula Builder.
  • Text Area: type the text.
  • Checkbox: select True (checked) or False (cleared). Leave – select – for no default.

A field has a typed value or a formula, not both. When there is a typed value, the formula button is disabled. To remove the value or the formula, click the trash icon (Clear value/formula).

The value should fit the field type. If it doesn’t, the box shows a message, for example “Only number allowed” for a Number field, or “Incorrect email” for an Email field. For Date fields, see Date.

To fill the field with a detail of the user who creates the transaction, type one of these values:

Value The field gets
$initiator.first_name The user’s first name.
$initiator.last_name The user’s last name.
$initiator.email The user’s email address.
$initiator.phone The user’s phone number.
$initiator.username The user’s login name.

A default value formula is calculated once, when the transaction is created, from the default values of the other fields. Values sent when the transaction is created, for example through the API, replace the default value of their own field, but aren’t used in the formulas of other fields.

The defaults of Radio and List Of Values fields are on their Values & Display tab. See Radio and List Of Values.

A dependent value sets the field’s value when its conditions are met.

  1. Click Add Dependent Value.
  2. Enter the value, or click the formula button (Edit Formula) and build it in the Formula Builder. You can also type an expression that starts with =.
  3. Click Add Condition, and set the condition. See Conditions. Add more conditions as needed.

The Conditional Values tab with a dependent value: a formula and one condition

Dependent values work like dependencies:

  • All the conditions of a dependent value must be true (AND).
  • They are checked from top to bottom, and only the first dependent value whose conditions are all true is applied. To change the order, drag a dependent value by its handle.
  • A dependent value without conditions is always applied. The Issues tab warns about it.

If the value or the formula gives an empty result, the field keeps its current value. To empty the field when the conditions are met, use a formula with CLEAR. See CLEAR.

To set the value of a Radio or List Of Values field, use the value of the option. For a Checkbox, use =true to check the box and =false to clear it. For a Paragraph, a dependent value replaces the text of the paragraph. See Paragraph.

To delete a dependent value, click the trash icon (Remove conditional value) in its header.

A typed value that starts with = is an expression: field IDs in it are replaced by the values of the fields, and other text is kept as it is.

Value Result
=FNAME The value of the field FNAME.
=LNAME FNAME The values of LNAME and FNAME, with a space between them.
=Approved The text “Approved”, when there is no field with this ID.
=OrderSum * 0.17 The value of OrderSum multiplied by 0.17, rounded to a whole number. Use CALC in the Formula Builder to keep decimals.
=true, =false For a Checkbox: checks or clears the box.

Field IDs are case-sensitive. In an expression with more than one field or word, an empty field is replaced by 0. When the value has +, -, * or /, Cellosign tries to calculate it; if it isn’t a calculation, the text is kept, for example =FNAME-LNAME gives “Dana-Tidewell”. For anything more than a copy or a simple calculation, use the Formula Builder.

In a template that a process builds from data (see Data model), a typed dependent value can only copy one field, for example =FNAME. Build any other value with the Formula Builder, or the template can’t be built.

A condition compares the value of another field with a value. Dependencies and conditional values use the same conditions.

Setting What to enter
Select field The field to check. Fields are shown as the question and the type, for example “Customer type (select)”. When two fields have the same question, the field ID is added. Point to a field to see its ID and type. Type to search.
Select operation How to compare. Shown after you select a field. The operations depend on the field type. See Operations.
Value The value to compare with. For Radio fields, and List Of Values fields with options you typed, select the option from the list. For other fields, type it. Not shown for Empty, Not Empty, Selected and Not Selected.

You can’t select:

  • Location, Paragraph, Button and Drawing fields;
  • a field that another condition of the same dependency or conditional value already uses;
  • in a conditional value, the field itself.

To delete a condition, click its trash icon (Remove condition).

Field type Operations
Text, Text Area, Email, Telephone Empty, Not Empty, Equal, Contains
Number Greater than, Less than, Equal, Not Equal, Empty, Not Empty
ID Number Equal, Not Equal
Checkbox Selected, Not Selected
Radio, List Of Values Equal, Not Equal, Empty, Not Empty. With Multi select: Contains, Not Contains, Empty, Not Empty
Date, Auto Date Greater than (after the date), Less than (before the date)
File Upload, Image Upload, Signature, Table Empty, Not Empty
Other types Empty, Not Empty, Equal, Contains

Equal and Contains compare texts exactly, including upper and lower case. For a Radio or List Of Values field with Multi select, Contains is true when the option is one of the selected options.

For the dates you can compare with, see Date. For lists connected to a dictionary, see List Of Values.

The Formula Builder builds a value from fields, fixed texts and data model items, without code. You open it with the formula button of a default value, a dependent value or a table column. See Formula Builder.

The Issues tab of the template editor warns about incomplete dependencies and conditional values, for example:

  • a condition without a field, an operation or a value;
  • a dependency or a dependent value without conditions;
  • a dependent value without a value or formula;
  • a condition on a field that no longer exists;
  • in a workflow, a dependency without recipients;
  • conditional values that depend on each other in a loop (“Circular dependency detected”).

Click the field in the list to open it on the tab with the problem.