Applies To: SharePoint On-premises (2013/2016/2019/SharePoint Server Subscription Edition) and SharePoint Online
For more functions, refer to this article
Description
This article describes the syntax and examples of the functions that are available in our NITRO Workflows component.
Functions available in NITRO Workflows
$pad([Placeholder],length,padchar,left/right)
This function is used to add specified padding character to left or right of the text to the specified length.
Syntax: $pad([ColumnDisplayName|ColumnInternalName],length,padchar,left/right)
Example: $pad([ID|ID],6,0,left)
ID: 6
Output: 000006
$DateFormat(Format,DateTimeField)
This function is used to format a date value as per specified format.
Syntax: $DateFormat(Format,[ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example 1: $DateFormat(dd MMMM yyyy HH:mm:ss,[Due Date|DueDate])
Due Date: 5/30/2023
Output: 30 May 2023 05:00:00
Example 2: $DateFormat(dd MMMM yyyy HH:mm:ss)
Output: 30 May 2023 06:30:00
For more format options refer: https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
$Day(DateTimeField)
This function is used to get the day number from the given date.
Syntax: $Day([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $Day([Due Date|DueDate])
Due Date: 05/30/2023
Output: 30
$Month(DateTimeField)
This function is used to get the month number from the given date.
Syntax: $Month([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $Month([Due Date|DueDate])
Due Date: 05/30/2023
Output: 05
$Year(DateTimeField)
This function is used to get the year number from the given date.
Syntax: $Year([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $Year([Due Date|DueDate])
Due Date: 05/30/2023
Output: 2023
$Weekday(DateTimeField)
This function is used to get the day of week from the given date.
Syntax: $Weekday([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $Weekday([Due Date|DueDate])
Due Date: 05/30/2023
Output: Tuesday
$WeekdayNumber(DateTimeField)
This function is used to get the day of the week number from the given date.
Syntax: $WeekdayNumber([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $WeekdayNumber([Due Date|DueDate])
Due Date: 05/30/2023
Output: 2
Below are the weeks and corresponding weekday numbers.
Week Name | Week Day Number |
Sunday | 0 |
Monday | 1 |
Tuesday | 2 |
Wednesday | 3 |
Thursday | 4 |
Friday | 5 |
Saturday | 6 |
$WeekNumber(DateTimeField)
This function is used to get the week number from the given date.
Syntax: $WeekNumber([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $WeekNumber([Due Date|DueDate])
Due Date: 05/30/2023
Output: 23
$DayOfTheYear(DateTimeField)
This function is used to get the day of the year from the given date.
Syntax: $DayOfTheYear([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $DayOfTheYear([Due Date|DueDate])
Due Date: 05/30/2023
Output: 150
$Hour(DateTimeField)
This function is used to get the hour number from the time part of the given date.
Syntax: $Hour([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $Hour([Due Date|DueDate])
Due Date: 05/30/2023 7:30:45 PM
Output: 19
$Minute(DateTimeField)
This function is used to get the minute number from the time part of the given date.
Syntax: $Minute([ColumnDisplayName|ColumnInternalName])
Note: Column placeholder in above syntax is optional. By default, it will consider the site’s current time.
Example: $Minute([Due Date|DueDate])
Due Date: 05/30/2023 7:30:45 PM
Output: 30
$Days(DateTimeField,DateTimeField)
This function is used to get the difference in days for two date values.
Syntax: $Days([ColumnDisplayName|ColumnInternalName],[ColumnDisplayName|ColumnInternalName])
Example: $Days([End Date|EndDate],[Start Date|StartDate])
Start Date: 05/29/2023 12:00 AM
End Date: 05/30/2023 5:00 AM
Output: 1
$Hours(DateTimeField,DateTimeField)
This function is used to get the difference in hours for two date values.
Syntax: $Hours([ColumnDisplayName|ColumnInternalName],[ColumnDisplayName|ColumnInternalName])
Example: $Hours([End Date|EndDate],[Start Date|StartDate])
Start Date: 05/29/2023 12:00 AM
End Date: 05/30/2023 5:00 AM
Output: 29
$Minutes(DateTimeField,DateTimeField)
This function is used to get the difference in minutes for two date values.
Syntax: $Minutes([ColumnDisplayName|ColumnInternalName],[ColumnDisplayName|ColumnInternalName])
Example: $Minutes([End Date|EndDate],[Start Date|StartDate])
Start Date: 05/29/2023 12:00 AM
End Date: 05/30/2023 5:00 AM
Output: 1740
$Seconds(DateTimeField,DateTimeField)
This function is used to get the difference in seconds for two date values.
Syntax: $Seconds([ColumnDisplayName|ColumnInternalName],[ColumnDisplayName|ColumnInternalName])
Example: $Seconds([End Date|EndDate],[Start Date|StartDate])
Start Date: 05/29/2023 12:00 AM
End Date: 05/30/2023 5:00 AM
Output: 104400
$Left(TextField or Value,number)
This function is used to get the specified number of characters from the left of the given text.
Syntax: $Left([ColumnDisplayName|ColumnInternalName],number)
Example: $Left([Type of Request|TypeofRequest],3)
Type of Request: INCIDENT
Output: INC
$Right(TextField or Value,number)
This function is used to get the specified number of characters from the right of the given text.
Syntax: $Left([ColumnDisplayName|ColumnInternalName],number)
Example: $Left([Type of Request|TypeofRequest],3)
Type of Request: INCIDENT
Output: ENT
$Substring(TextField or Value,Start number,length)
This function is used to get the specified number of characters starting from the given starting position of the text.
Syntax: $Substring([ColumnDisplayName|ColumnInternalName], Start number, length)
Example: $Substring([Type of Request|TypeofRequest],3,5)
Type of Request: INCIDENT
Output: IDENT
$ToLowerCase(TextField)
This function is used to convert given text to lower case.
Syntax: $ToLowerCase([ColumnDisplayName|ColumnInternalName])
Example: $ToLowerCase([Title|Title])
Title: INCIDENT
Output: incident
$ToUpperCase(TextField)
This function is used to convert given text to upper case.
Syntax: $ToLowerCase([ColumnDisplayName|ColumnInternalName])
Example: $ToLowerCase([Title|Title])
Title: incident
Output: INCIDENT