Skip to main content

Example of Assigning Default Values to Fields through Functions


Check items

When assigning a value to a check items field through a function, it must return true or false; true represents checked, and false represents unchecked.

Example 1: When the "Score" field is greater than or equal to 60, the "Pass" field is defaultly checked; otherwise, it is unchecked.

IF(Score >=60,true,false)

Example 2: When the "Score" field is empty, the "Absent" field is defaultly checked; otherwise, it is unchecked.

ISBLANK(Score)

The results returned by logical functions are true or false and can be used directly.

Single select

Assigning default values to single select fields through functions involves comparing with options. If there is a match, the default value is assigned; if there is no match, no action is taken.

Example: Assigning levels based on scores (single select field, options are Fail, Pass, Good, Excellent)

  • If the score is less than 60, it is Fail
  • If the score is greater than or equal to 60 but less than 75, it is Pass
  • If the score is greater than or equal to 75 but less than 85, it is Good
  • If the score is greater than or equal to 85, it is Excellent

Assigning default values:

IF(Score<60,'Fail',IF(Score<75,'Pass',IF(Score<85,'Good','Excellent')))

  • If the value returned is a fixed value, like Fail, quotes must be added in the function.
  • If the value returned is a field, simply select the field without adding quotes before or after.

Multiple select

There are two ways in functions that can be used to assign default values to multiple select fields.

  • Method 1: Separate the text with an English comma, defaultly checking option 1 and option 3.

    'Option 1, Option 3'

  • Method 2: Use an array, defaultly checking option 2 and option 3.

    ['Option 2', 'Option 3']

Example: If the gender is male, select basketball and volleyball as default optional courses; if female, select gymnastics as default.

Method 1:

Method 2:

Have questions about this article? Send us feedback