Function: Append in NITRO Workflows and Custom Actions

Applies to: NITRO Workflows and Custom Actions (Online)

For complete list of functions, please refer to this article.

Introduction

This function can be used to append value to a collection. For example: Add a user to an existing collection of users in a multi-user column. Supported column types to add value are multi-user, multi-lookup and multi-choice. Appended values can also be saved in text type columns.

Syntax:

With Expression Builder Ex:

To use ‘Append’ function without expression builder use below syntax:

$append(lookup/lookupid/lookupvalue/user/userid/uservalue/multichoice/string,separator,[placeholder],[placeholder])

Parameters to be defined in above function:

Param1- Lookup/LookupId/LookupValue/User/UserId/UserValue/MultiChoice/String:

S. No.Parameter ValueDescription
1LookupTarget column is of type multi-lookup.
2LookupIdTarget column is of type multi-lookup. Or target column is of type text and only lookup item Ids are required.
3LookupValueTarget column is of type text and only lookup item display values are required.
4UserTarget column is of type multi-user.
5UserIdTarget column is of type multi-user. Or target column is of type text and only user Ids are required.
6UserValueTarget column is of type text and only user display values (name of user) are required.
7MultiChoiceTarget column is of type multi-choice.
8StringTarget column is of type text. Or target is a variable.

Param2- separator:

For ‘String’ type output or when target is a text type column or a variable, specify the separator for the values. Multiple values separated by specified character can be used in scenarios where such a list needs to be passed to external systems via Invoke Web API action. Or data must be converted to specified format and saved to text type columns.

Param3- [Placeholder]:

Specify column placeholder, fixed value, or variable for input values.

Param4- [Placeholder]:

Specify column placeholder, fixed value, or variable for input values.

Click ‘+’ (available in right side of Append Function in EB) to add more parameter in the function. These parameters can be a column placeholder, fixed value, or variable for input values.

Please refer to below table for scenarios and corresponding parameters for the append function.

Scenario DescriptionTarget Column Type / VariableParam 1Param 2: SeparatorParam 3: [Placeholder]/Fixed Value/VariableParam 4: [Placeholder]/Fixed Value/VariableMore ParametersOutput Example
Add values from a lookup column to a multi-lookup column.  Multi-Lookup Column to which value needs to be added   Ex: [LookupMultiCategory]LookupNot RequiredSame as target column: [LookupMultiCategory]   Value before append: Calendar;EmailColumn whose value need to be added. Value in this column will not change.   Column: [LookupSingleCategory]   Value: FinanceNAValue in target column after append: Calendar;Email;Finance
Get a comma separated list of lookup column Id values from two or more lookup columns.Variable/ Text columns to which value needs to be added   Ex: [TextLookupId]    LookupId,Same as target column: [TextLookupId]   Value before append:  Ex: 6Column whose value need to be added. Value in this column will not change.   Column: [LookupMultiCategory]   Value: Calendar;EmailColumn whose value need to be added. Value in this column will not change.   Column: [SingleConverted]   Value: 1Value in target column after append: 6,4,5,1
Get a semicolon separated list of lookup column display values from two or more lookup columns.Variable/Text Column to which value needs to be added   Ex: [TextLookupValue]LookupValue;Same as target column: [TextLookupValue]   Value before append: Ex: Desktop  Column whose value need to be added. Value in this column will not change.   Column: [LookupMultiCategory]   Value: Calendar;EmailColumn whose value need to be added. Value in this column will not change.   Column: [SingleConverted]   Value: Hardware Request  Value in target column after append: Desktop;Calendar;Email;Hardware Request
Add values from a user column to a multi-user column.  Multi-User Column to which value needs to be added   Ex: [UserAndGroupMulti]UserNot RequiredSame as target column: [UserAndGroupMulti]   Value before append: Ex: TemplateTest3 Members; Maria ClarkColumn whose value need to be added. Value in this column will not change.   Column: [UserAndGroupSingle]   Value: Joe BloggsNAValue in target column after append: TemplateTest3 Members;Maria Clark; Joe Bloggs
Get a semicolon separated list of user Id values from user column and fixed value.Variable/Text Column to which value needs to be added   Ex: [TextUserId]  UserId;Same as target column: [TextUserId]   Value before append: Ex: 129Column whose value need to be added. Value in this column will not change.   Column: [UserAndGroupMulti]   Value: TemplateTest3 Members; Maria ClarkFixed Value Ex: 26Value in target column after append: 129;140;153;26
Get a semicolon separated list of user display values from user column and fixed value.Variable/Text Column to which value needs to be added   Ex: [TextUserValue]  UserValue;Same as target column: [TestUserValue]   Value before append: Ex: Scott RestivoColumn whose value need to be added. Value in this column will not change.   Column: [UserAndGroupMulti]   Value: TemplateTest3 Members; Maria ClarkFixed Value Ex: James RestivoValue in target column after append: Scott Restivo; TemplateText3 Members;Maria Clark;James Restivo
Add values from a choice column and variable to a multi-choice column.  Multi-Choice Column to which value needs to be added   Ex: [DepartmentMulti]MultiChoiceNot RequiredSame as target column: [DepartmentMulti]   Value before append: Ex: Sales,HRColumn whose value need to be added. Value in this column will not change.   Column: [DepartmentSingle]   Value: MarketingVariable: [varDepartment] Ex: Electronics  Value in target column after append: Sales;HR;Marketing;Electronics
Get a comma separated list of choice column values from two or more choice columnVariable/Text Column to which value needs to be added   Ex: [TextString]  String,Same as target column: [TextString]   Value before append: Ex: FinanceColumn whose value need to be added. Value in this column will not change.   Column:[DepartmentMulti]   Value: Sales,HRColumn whose value need to be added. Value in this column will not change.   Column: [DepartmentSingle]   Value: Marketing  Value in target column after append: Finance,Sales,HR,Marketing
Other supported Scenarios
Add values from a user column and fixed value to a multi-lookup column.  Multi-User Column to which value needs to be added   Ex: [MultiUserWithUserId]UserId;#;#Same as target column: [MultiUserWithUserId]   Value before append: Ex: TemplateTest3 Members; Maria ClarkColumn whose value need to be added. Value in this column will not change.   Column: [UserAndGroupSingle]   Value: Joe BloggsFixed Value: 70(Id of Demo Site Members)Value in target column after append: TemplateTest3Members; Maria Clark; Joe Bloggs; Demo Site Members
Add values from a lookup column and fixed value to a multi-lookup column.  Multi-lookup column to which value needs to be added   Ex: [MultiLookupWithLookupId]  LookupId;#;# (For getting multiple Lookup id use this separtor)    Same as target column: [MultiLookupWithLookupId]   Value before append: Ex: Calendar;EmailColumn whose value need to be added. Value in this column will not change.   Column: [LookupSingleCategory] Value: FinanceFixed Value: 6(Id of Printer)Value in target column after append: Calendar;Email;Finance;Printer

Note:

  • In NITRO Workflows: For users, to append a hard-coded user, specify one of the below user attributes:
  • DisplayName
  • Id
  • Email
  • In Custom Actions: For users, to append a hard-coded user, specify the ‘ID’ attribute of the user or SP Group or AD Group.

Example of Append Function:

In Custom Actions, Configure Append Function in Column Mappings of Update Item Action.

  • Configure Update item custom action

Define Variables

Configure ‘Append’ function for different types of columns as shown below:

Configure Column Mapping for ‘TextLookupValue’ column using Expression Builder as shown below:

Similarly, configure other columns mappings using Expression Builder.

Item column values before running the custom action:

Item column values after running the custom action: