Using Functions in Action Definitions

Action definitions created via the Actions Wizard support the use of the date functions listed below. In addition, several functions can be used in action definitions that populate or modify single and multi-line columns. They can be identified within the action definition or utilized when a column is populated by the user when the action is run. The purpose of each function is discussed below.

Date Functions

NOTE: These date functions are all relative to the current date.

Table 1: Action Types

Function

Meaning

[Today]

Today's date

[CurrentWeekStart]

Sunday of the current week

[CurrentWeekEnd]

Saturday of the current week

[CurrentMonthStart]

The first day in the current month

[CurrentMonthEnd]

The last day in the current month

[CurrentYearStart]

The first day in the current year

[CurrentYearEnd]

The last day in the current year

[Quarter1Start]

The first day in the first quarter (January 1) of the current year

[Quarter1End]

The last day in the first quarter (March 31) of the current year

[Quarter2Start]

The first day in the second quarter (April 1) of the current year

[Quarter2End]

The last day in the second quarter (June 30) of the current year

[Quarter3Start]

The first day in the third quarter (July 1) of the current year

[Quarter3End]

The last day in the third quarter (September 30) of the current year

[Quarter4Start]

The first day in the fourth quarter (October 1) of the current year

[Quarter4End]

The last day in the fourth quarter (December 31) of the current year

[OneWeekAgoStart]

Sunday of the previous week

[OneWeekAgoEnd]

Saturday of the previous week

[TwoWeeksAgoStart]

Sunday of the week before last

[TwoWeeksAgoEnd]

Saturday of the week before last

[OneWeekFromNowStart]

Sunday of next week

[OneWeekFromNowEnd]

Saturday of next week

[TwoWeeksFromNowStart]

Sunday of the week after next

[TwoWeeksFromNowEnd]

Saturday of the week after next

[OneMonthAgoStart]

The first day of last month

[OneMonthAgoEnd]

The last day of last month

[OneMonthFromNowStart]

The first day of next month

[OneMonthFromNowEnd]

The last day of next month

Table 2: Date Functions

Additional Functions

[CurrentSiteURL]

When the [CurrentSiteURL] function is utilized, it will return the URL of the site from which the action is executed, without the protocol (the “http://” or “https://” portion). Because it does not return the protocol, it should not be used in a hyperlink field.

[CurrentSiteTitle]

In addition to the URL of the current site, the [CurrentSiteTitle] function will return the title of the site from which the action is executed.

[ItemDisplayFormUrl]

This function returns a link to the display form of the selected list or library item, providing quick and easy access to view all available metadata for the item.

[ItemEditFormUrl]

This function returns a link to the edit form of the selected list or library item, providing quick and easy access to modify any metadata for the item.

[Me], [Date], [Time]

These functions are available for use with actions to return the following information:

      [Me] – The user information for the currently logged in user

      [Date] – The current date when the list item is created or modified by the action

      [Time] – The current time when the list item is created or modified by the action

 

To provide an example of how these functions can be used, consider this scenario. The [CurrentSiteURL] and [CurrentSiteTitle] functions can be used together when you have created a new project site and want to have it reviewed. You could add the Action Launcher to your new site and use it to execute a Create List Item action that references these two functions and adds the item to a reviewing committee’s workplace inbox. The Create Item Link action references a specific list item. The [CurrentSiteURL] function lets you reference a site, instead. The [CurrentSiteTitle] returns the site’s title, which has more meaning than the URL alone.