Scripting with Liquid
Formatting IDs and names

A liquid formatted template for the creating the entity. The template is replaced on the server with the calculated values.

Any standard field of the entity can be accessed and logic operators can be written if desired. Using a poorly written template may cause ID conflict errors that report using ugly errors because they bypass initial field validation. You may want to use Professional Services to help create or vet these.

Useful examples:

Using Liquid in preferences to assign ID or Name a value so you don't have to enter both in

Create a new GUID/UUID: (Globally Unique, never will 2 identical be created.)

{% newGuid %}

Here are some samples of what they could look like:

b99b8c1a-f989-4ac2-81c9-f95be021b3f9
cee6ab1d-886a-4846-bc00-33e040042452
166e47b1-a889-464f-98de-13fda648a3d6

For more info on what GUID/UUIDs are: GUID vs UUID what are they

Create a new system default ID. These currently are 4 words separated by '.', and will be no longer than 25 characters.

Note the upper case I in the text below, the other characters are lower case.

{% newId %}

To use the entities primary key

{{ PK }}

This will typically be a few digit number. Starting with 1 for the 1st created, and going up usually by one at a time.

Date based

{{ "now" | date:"%Y.%m.%d" }}

This says, use the liquid function "now" which returns a date, then pipe it (pass it) to the date formatting function using the specified date function.

We have more examples for assigning the ID and Name in a document dedicated to that

See

Useful links:

Documentation on Liquidjs language:

https://liquidjs.com/tutorials/intro-to-liquid.html

Documentation on date format syntax:

https://shopify.github.io/liquid/filters/date/