New E-mail Template > Process Data tab > E-mail Macro

These are the macros you can use as process data variable. These macros are mainly used in message templates.

Figure: E-mail Macro screen

Email Macro screen

Examples

How to Start

  1. Do one of these:
  2. On the Application Explorer screen, do one of these:
  3. In the Process Builder, in the My Application pane, expand your application, and do one of these:
    • Click Notification
      1. Click E-mails E-mails icon.
      2. Do one of these:
        • To create an e-mail template, click New New icon.
        • To change an e-mail template, click the template, and click Edit Edit icon.
    • Click Process Model
      1. Double-click your process.
      2. Click Notification Notification icon > E-mail Template E-mail Template icon.
      3. On the E-mail Template screen, in the Model Template, click Add Add icon.
  4. Click the Content tab.
  5. On the Process Data screen, click E-mail Macro.

Fields

Field Name Definition

$CONVERTDATETIME()

Function:
Changes the current date-time value to a specified time zone.
Syntax:
$CONVERTDATETIME(ConvertDateTimeInAgilePoint)
Accepted Values:
The input for the (ConvertDateTimeInAgilePoint) parameter can be one of these:
Example:
  • $CONVERTDATETIME(06/16/2017 11:30:42 AM,Eastern Standard Time (North America) changes the value to 06/16/2017 03:00:42 AM
  • $CONVERTDATETIME(${/pd:AP/pd:formFields/pd:DateTime1},Japan Standard Time (Tokyo)) changes the stored current date and time value to 6/13/2017 3:02:06 PM

$FORMATDATETIME()

Function:
Converts a date-time value to a specified date-time format.
Syntax:
$FORMATDATETIME(ValidDateTimeInAgilePoint)
Accepted Values:
The input for the (ValidDateTimeInAgilePoint) parameter can be one of these:
This macro supports these date and time formats:
  • M/d/yyyy
  • M/d/yy
  • yyyy-MM-dd
  • d-MMM-yy
  • M.d.yyyy
  • d MMMM yyyy
  • MMMM yy
  • MMM-yy
  • M/d/yyyy h:mm
  • M/d/yyyy h:mm:ss
  • h:mm
  • h:mm:ss
  • HH:mm
  • HH:mm:ss
Example:
  • $FORMATDATETIME(06/08/2017 01:30:42,yyyy/M/d hh:mm) changes the value to 2017/6/8 01:30
  • $FORMATDATETIME(${/pd:AP/pd:formFields/pd:DateTime},M/d/yyyy h:mm) changes the stored value 31/07/20017 11:00:12 to 07/31/2017 11:00

$GROUP()

Function:
Gets the members of a group.
  • When used in the To, CC, and BCC fields of an e-mail template, this macro gets the e-mail addresses for all the members in the group.
  • When used in the the e-mail body of an e-mail template, this macro shows the names of all the members of the group.
Syntax:
$GROUP(ValidGroupNameInAgilePoint)
Accepted Values:
The input for the (ValidGroupNameInAgilePoint) parameter can be one of these:
Example:
  • $GROUP(Administrators)
  • $GROUP(${/my:myFields/my:groupname)

Also refer to:

$ROLE()

Function:
Gets the users who are assigned a role.
  • When used in the To, CC, and BCC fields of an e-mail template, this macro gets the e-mail addresses of all the users who are assigned the role. This includes the users who are members of a group that is assigned the role.
  • When used in the the e-mail body of an e-mail template, this macro shows the names of all the users who are assigned the role. This includes users who are members of a group who is assigned the role.
Syntax:
$ROLE(ValidRoleNameInAgilePoint)
Accepted Values:
The input for the (ValidRoleNameInAgilePoint) parameter can be one of these:
Example:
  • $ROLE(Manager)
  • $ROLE(${/my:myFields/my:rolename})

$MANAGER()

Function:
Gets the manager for the specified user name. In other words, UserName is the subordinate.
Syntax:
$MANAGER(UserName)
Accepted Values:
The input for the subordinate UserName parameter can be one of these:
Example:
  • $MANAGER(DOMAIN\john)
  • $MANAGER(${/my:myFields/my:username})

$URLSHORTNER()

Function:
Gets the short form of a URL.

To use this macro, you must have a Bitly access token.

For more information, refer to Access tokens for Bitly.

Syntax:
$URLSHORTNER(URL)
Accepted Values:
The input for the URL parameter can be one of these:
Example:
  • $URLSHORTNER(https://myportal.com/ApplicationBuilder/eFormRender.html?Process=MyDemo)
  • $URLSHORTNER(${/pd:AP/pd:formFields})
Limitations:

$XMLREPEATING2HTML()

Function:
When used in an e-mail template, this macro returns an HTML table that contains the repeating data from the form in the generated e-mail notification.
Syntax:
$XMLREPEATING2HTML(XpathRepeatingSchemaElement)
Accepted Values:
The input for the (XpathRepeatingSchemaElement) parameter is an Xpath to a repeating schema element from your AgilePoint NX application. To refer to a literal XML string from an Xpath, add a tilde (~) at the end of the path.
Example:
$XMLREPEATING2HTML(${/pd:AP/pd:formFields/pd:SubForm1_SubForm~})

Also refer to:

Common Usage:
In the body of an e-mail template to show data from a subform.

$XMLREPEATING2HTMLWITHFILTER()

Function:
This macro formats the output in an HTML table, with the specified values removed.
Syntax:
$XMLREPEATING2HTMLWITHFILTER(XpathRepeatingSchemaElementWithFilter)
Accepted Values:
This macro accepts as a parameter an Xpath expression for the location of a schema element from your app.
Example:
$XMLREPEATING2HTMLWITHFILTER(${/pd:AP/pd:formFields/pd:SubForm1_SubForm~},{TextBox3;TextBox4},{DateTime2,M/d/yyyy h:mm})
Common Usage:
In the body of an e-mail template to show data from a subform.