Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this Page

...

Expression


Code Block
$.hasOwnProperty('customer.lastname') || 'default'


DescriptionThe expression verifies if $customer.lastname exists in the input document. It returns True if $customer.lastname exists, else it shows 'default' as a string and applies it to the target path. 

Checking for a Non-empty String and an Existing Value

...

Expression


Code Block
Date.now().toLocaleDateString('{\"timeZone\":\"PST\", "format":"yyyy-MM-dd"}')


DescriptionThe expression will create creates the current date time in the PST timezone and format formats its output into a string in the form of yyyy-MM-dd.

...

Expression


Code Block
Date.now().toLocaleDateString('{\"timeZone\":\"PST\"}')


DescriptionThe expression will create creates the current date time in the local time zone and format formats its output into a string for the ISO date time format.

...

Expression


Code Block
Date.parse($StandardDate)


DescriptionWill parse This expression parses a string representation of $StandardDate into a DateTime object. The string representation is expected to should have one of the following formats:
  • yyyy/MM/dd
  • yyyy/MM/dd HH:mm
  • yyyy/MM/dd HH:mm:ss
  • yyyy/MM/dd HH:mm:ss.SSS
  • MM/dd/yyyy
  • MM/dd/yyyy HH:mm
  • MM/dd/yyyy HH:mm:ss
  • MM/dd/yyyy HH:mm:ss.SSS
  • MMM dd, yyyy
  • EEE, dd MMM yyyy HH:mm:ss
  • EEE, dd MMM yyyy HH:mm:ss z
  • EEE, dd MMM yyyy HH:mm:ss 'GMT'Z
  • yyyy-MM-dd
  • yyyy-MM-dd'T'HH:mm:ss
  • yyyy-MM-dd'T'HH:mm:ssXXX
  • yyyy-MM-dd'T'HH:mm:ss.SSS
  • yyyy-MM-dd'T'HH:mm:ss.SSSXXX
  • yyyy-MM-dd HH:mm
  • yyyy-MM-dd HH:mm:ss
  • yyyy-MM-dd HH:mm:ssXXX
  • yyyy-MM-dd HH:mm:ss.SSS
  • yyyy-MM-dd HH:mm:ss.SSSXXX

...

Expression


Code Block
Date.parse($NonStandardDate, "yyyy MM dd")


Code Block
Date.parse($nonstandard_datetime, "yyyy-MM-dd HH:mm:ss.SSS")


DescriptionThese examples parse the date into a DateTime object using the provided format.


Formatting Today's Date to Display as the Current Month

Expression


Code Block
Date.now().toLocaleDateString({"format":"MMMM"})


DescriptionThis expression takes today's date and formats the output in a string indicating the month in text.

Filtering Examples

Filtering for Two Possible Values

...