How to define the variables

<< Click to Display Table of Contents >>

Navigation:  Custom Actions > Variables >

How to define the variables

In the custom action settings page, we have the “Variables” button in the “What Actions to Execute” section (See screenshot below).

 

CA Variable in legacy

 

In designer custom action, 'Variable' is available in custom action ribbon as shown below

 

CA Variable in designer

 

Clicking the “Variables” button opens a dialog that shows existing variable definitions along with “New Variable” button (See screenshot below).

 

CA new Variable

 

Clicking on the “New Variable” button opens a dialog and prompt to enter the variable name and default value (see screenshot below).

 

CADefine variable

 

Variable Name: Specify a name for Variable. This name will be used in the later actions to access the value that we store in this Variable.

 

Default Value:

Value that we are going to store in the variable. It can be empty, literal value (string), placeholder from current list item and value returned by a function.

Note: Variable names should be unique

 

Example:

Variable Name: varUsers

Default Value: Supports following types

Literal/Custom values

Another field value (Place holders of current list item)

Functions (Takes place holders of current list item as possible arguments)