Articles in this section

How to generate a unique number using Ticks()

This article explains what the Ticks() function is and provide examples of how it can be used with the binding syntax in smart templates.  

  Prerequisites

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in installed.
  • Space owner access to the Templafy tenant.

What is the Ticks() function? 

Ticks() is a function that returns a unique number based on the date and time. The function is commonly used for with template settings and properties to set a uniquely identifiable number for a document ID.

Ticks() logic

Syntax {{Ticks()}}
Output Unique 18 digit number

  Important

Ticks() function examples

Example 1

Using the Ticks() function into a custom text binding smart field to insert a unique number in the smart template.

Binding {{Ticks()}}
Output 637376719681534753

Example 2

Using the Ticks() function as the prefill text of the "DocumentID" question originating from the response form.

Ticks prefill text template designer.png  

The result looks like this:

Ticks_prefill_enduser.png

Example 3

Using the Ticks() function as the 'Title' property through the template settings and properties.
Once the document has been created the 'Title' document property is a unique identifiable number:

Ticks document property template designer.png Ticks_properties.png
lower case tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.