Built-In Macros

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

Fields

Name Description

$CONVERTDATETIME()

$CONVERTDATETIME(ConvertDateTimeInAgilePoint)

Changes the current date-time value to a specified time zone.

The input for the (ConvertDateTimeInAgilePoint) parameter can be one of these:

  • A literal date-time value

    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.

  • An Xpath to a process data variable from your AgilePoint NX application

    Example: $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()

$FORMATDATETIME(ValidDateTimeInAgilePoint)

Converts a date-time value to a specified date-time format.

The input for the (ValidDateTimeInAgilePoint) parameter can be one of these:

  • A literal date-time value

    Example: $FORMATDATETIME(06/08/2017 01:30:42,yyyy/M/d hh:mm) changes the value to 2017/6/8 01:30.

  • An Xpath to a process data variable from your AgilePoint NX application

    Example: $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.

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

$GROUP()

$GROUP(ValidGroupNameInAgilePoint)

The input for the (ValidGroupNameInAgilePoint) parameter can be one of these:

$ROLE()

$ROLE(ValidRoleNameInAgilePoint)

The input for the (ValidRoleNameInAgilePoint) parameter can be one of these:

$MANAGER()

$MANAGER(UserName)

Gets the manager for the specified user name. In other words, UserName is the subordinate.

The input for the subordinate UserName parameter can be one of these:

  • A literal AgilePoint NX user name

    Example: $MANAGER(DOMAIN\john)

  • An Xpath to a process data variable from your AgilePoint NX application

    Example: $MANAGER(${/my:myFields/my:username})

$URLSHORTNER()

$URLSHORTNER(URL)

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.

The input for the URL parameter can be one of these:

  • A literal URL address.

    Example: $URLSHORTNER(https://myportal.com/ApplicationBuilder/eFormRender.html?Process=MyDemo)

  • An Xpath to a process data variable from your AgilePoint NX application

    Example: $URLSHORTNER(${/pd:AP/pd:formFields})

Limitations:

$XMLREPEATING2HTML()

$XMLREPEATING2HTML(XpathRepeatingSchemaElement)

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.

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.

Example: $XMLREPEATING2HTML(${/pd:AP/pd:formFields/pd:SubForm1_SubForm~})

Common Usage: Can be used in the body of an e-mail template to show data from a form.

$XMLREPEATING2HTMLWITHFILTER()

$XMLREPEATING2HTMLWITHFILTER(XpathRepeatingSchemaElementWithFilter)

This macro accepts as a parameter an Xpath expression for the location of a schema element from your AgilePoint NX application This macro formats the output in an HTML table, with the specified values removed.

Example: $XMLREPEATING2HTMLWITHFILTER(${/pd:AP/pd:formFields/pd:SubForm1_SubForm~},{TextBox3;TextBox4},{DateTime2,M/d/yyyy h:mm})

Common Usage: Can be used in the body of an e-mail template to show data from a form.