Skip to main content

Document template modifiers

In this article, we'll explain what types of modifiers can be used for document templates and how they work

Uspacy Support Team avatar
Written by Uspacy Support Team
Updated this week

Modifiers are special notations that allow you to flexibly control how data is displayed in your document templates (e.g., in contracts, invoices, etc.).

Currently, in Uspacy, you can use the following ⬇️

Modifiers for amount (Money field)

~words

💡If it is necessary that the price of the products, their total amount or the amount of the deal, etc. (that is, any field of the type Money) should be entered in the form of the text, then the part ~words should be added to the character code.

Let’s consider the example of the Deal amount field. To display the deal amount by using the text form in the document, you need to enter the character code in the template as follows:

Deal Amount:

${DealsAmountOfTheDeal~words}

☝🏻 A quick note: cents ( depending on the currency) will always appear as a number in the word-based display. If they aren't specified, they'll still be written as "00 cents".

If you need both a numerical and text form, then you can enter it like this:

Deal Amount: ${DealsAmountOfTheDeal}

(${DealsAmountOfTheDeal~words})

~amount та ~currency

Additionally, to display only the numeric value in the document, you need to write the character code in the template like this:

Deal amount:
${DealsAmountOfTheDeal~amount}

To display only the currency, it should look like this:

${DealsAmountOfTheDeal~currency}

In other words, to control the appearance of a Money field in document templates, you need to use the following modifiers:

✔️ ~words

✔️ ~amount

✔️ ~currency

Modifiers for image size (Image field)

If you want the image in your generated document to have a specific size, use modifiers to specify the height and width (in pixels).

These are added to the character code of the field in the format: :X:Y

Where:

  • X = width

  • Y = height

For example, if the character code of the field without modifiers looks like this:

${DealsSignatureOfTheResponsiblePerson}

Then with modifiers it would be:

${DealsSignatureOfTheResponsiblePerson:100:75}

Modifiers for date fields (Field type: Date)

💡 Please note that the appearance of the date (time zone, format, and language) depends on the user's profile settings. If these settings are not specified, the system uses the default settings for the Space.

~date

If you need only the date (without the time) to appear in a document, add the ~date suffix to the character code of the field.

For example, if you have a field like "Payment date" but only the calendar date matters:

${DealsPaymentDate~date}

~time

If you need only the time (without the date), add the ~time suffix.

For example, if you’re only interested in the time part of "Payment date":

${DealsPaymentDate~time}

☝🏻 Unlike the date, time is always displayed in 24-hour format, regardless of the user’s or Space's settings.

If you have additional questions or you need to contact the support, send a request to this email [email protected]

Did this answer your question?