Syntax for expressions in NITRO Forms

Applied to:

Crow Canyon NITRO activated sites in:

SharePoint Online and On-Premises 2013/2016/2019

Introduction

This article describes the syntax used for column placeholders, functions, variables etc. in NITRO Forms.

Summary:

  1. Condition Builder Control
  2. Line/HTML Control
  3. Form Event Actions
    • Update Form Controls
    • Fetch Items
      • Use fetch items results in update form controls
      • Use fetch items results in condition builder

Detailed steps

Condition Builder Control

Supported placeholders:

Column value/PlaceholderSupported
Fixed valuesYes
Contextual placeholders ({Me}, {today}, {now})Yes
Item column value placeholderYes
FunctionsYes
URL Query string parametersNo
JavaScript variables on pageYes

Syntax: [Column Internal Name] or [Column Display Name|Column Internal Name]

Ex: [RequestStatus] or [Request Status|RequestStatus]

Syntax for functions:

Ex: $add([Cost|Cost],[Tax Amount|TaxAmount])

Note: Please refer this article for example functions

Anyone of above syntax is used in all of the below mentioned features in NITRO Forms:

  1. Tab/Section permissions
  2. Column permissions
  3. Column validations
  4. Group permissions
  5. Group validations
  6. Form event actions
    • Condition builder
    • Update form controls
  7. Action button permissions (Submit Action, Custom Action, Script Action)
  8. Attachment column permissions
Column TypeSyntax/PlaceholderExample/Scenario
Person or GroupFixed ValueDisplay Name of User i.e. James Restivo
Person or Group{Me}For logged-in user
Person or Group[Column Internal Name][Requester]
Date and TimeFixed value i.e. MM/DD/Year03/20/2021
Date and Time{today}Current date
Date and Time{now}Current date and time as per site regional time settings
Date and Time[Column Internal Name][DueDate]
All other columnsFixed valueClosed, Not Started etc..
All other columns[Column Internal Name][RequestStatus]
Functionsstrcat(column placeholder 1, column placeholder2)$strcat([First Name|FirstName], – ,[Last Name|LastName])

Line/HTML Control

Supported placeholders:

Column value/PlaceholderSupported
Fixed valueYes
Contextual placeholders ({Me}, {today},{now})No
Item column value placeholderYes
FunctionsYes
URL Query string parametersNo
JavaScript variables on pageNo

Syntax to show column value in Line/HTML control in edit and display forms.

Syntax: [Column Internal Name] or
[Column Display Name|Column Internal Name]

Ex: [AvailableBudget] or [Available Budget|AvailableBudget]

Note: To show the dynamic column value in Line/HTML control in new and edit forms, follow below syntax.

Syntax:
%%[Column Internal Name]%% or
%%[Column Display Name|Column Internal Name]%%

Function: %%$strcat([First Name|FirstName], – ,[Last Name|LastName])%%

Form Event Actions

Supported placeholders:

Column value/PlaceholderSupported
Fixed valuesYes
Contextual placeholders ({Me}, {today},{now})Yes
Item column value placeholderYes
FunctionsYes
URL Query string parametersNo
JavaScript variables on pageYes

Update Form Controls

Syntax to update form control with value of a column on the form as follows:

Syntax: [Column Internal Name] or [Column Display Name|Column Internal Name]

Ex: [RequestStatus] or [Request Status|RequestStatus]

Syntax to use functions: $strcat([First Name|FirstName], – ,[Last Name|LastName])

Column TypeSyntax/PlaceholderExample/Scenario
Person or GroupFixed valueDisplay name or Email Address of user
Ex: James Restivo
james@contoso.com
Person or Group{Me}For logged in User
Person or Group[Column Internal Name][Requester]
LookupFixed value1. Display name of lookup item value Ex: Calendar
2. ID of lookup item Ex: 5
Lookup[Column Internal Name][Category]
Date and TimeFixed value i.e. MM/DD/Year03/20/2021
Date and Time{today}Current date
Date and Time{now}Current date and time as per site regional time settings
Date and Time[Column Internal Name][DueDate]
All other columnsFixed valueNot Started, In Progress etc..
All other columns[Column Internal Name][RequestStatus]
Functionsstrcat(column placeholder 1, column placeholder2)$strcat([First Name|FirstName], – ,[Last Name|LastName])

Note: Please refer this article for example functions

Fetch Items

Syntax for using column placeholder in ‘Query’ and ‘Query Builder’ in “Fetch Items” action

Syntax: %%[Column Display Name|Column Internal Name]%%

Ex: %%[Request Status|RequestStatus]%%

Query:

Query Builder:

Use fetch items results in update form controls

Item (Single):

Syntax to use fetch items result in update form control actions.

Syntax: Fetch Items Action Variable Name##column Internal Name

Ex: CCSQLGetProductRates##DividendRate

Using JavaScript:

Use below functions to get the value from fetch results

1.window.ccs_g_FormUI.GetQLItemColumnValues("CCSQLLookupItem", "ID") – Output is ID value

2. window.ccs_g_FormUI.GetQLItemColumnValues("CCSQLLookupItem", ["ID", "Title"]) – Output is object.

Ex: {“ID”: “23”,”Title”: “Category Title”}

Note: In above script replace “CCSQLLookupItem” with “Fetch Items Action Variable Name”.

Sample script:

var CategoryId = window.ccs_g_FormUI.GetQLItemColumnValues("CCSQLLookupItem", "ID");
return CategoryId;

Items (Multiple):

Use execute script action to update the column controls on the form. Below function will return the results from items (multiple).

1.window.ccs_g_FormUI.GetQLItemColumnValues("CCSQLLookupItem", "ID", true) – Output is array

Ex: [“23″,”24”]

2. window.ccs_g_FormUI.GetQLItemColumnValues("CCSQLLookupItem", ["ID", "Title"], true) – Output is array object

Ex: [{“ID”: “23”,”Title”: “Category Title”},{“ID”: “24”,”Title”: “Category Title2”}]

Note: In above script replace “CCSQLLookupItem” with “Fetch Items Action Variable Name”.

Use fetch items results in condition builder control

Below is the syntax for using “Fetch Item” (single) result in advanced conditions:

Syntax: $QL(Fetch Items Action Variable Name##Column Internal Name,Value)

Ex: $QL(CCSQLGetConfiguration##Approver,Supervisor)