Placeholders
Placeholders are short expressions that eWay-CRM replaces with real values of an item, such as its name, owner, or customer. You can use them in templates for export to Word and PDF, in workflow actions, and in the names of exported files.
Placeholder Syntax
A placeholder starts with a dollar sign, followed by the variable name and the database name of a field in square brackets:
$VARIABLE[FieldName]
For example, $CURRENT_ITEM[FileAs] is replaced with the name of the current item. The template text
Offer No. $CURRENT_ITEM[FileAs]
becomes, for example, Offer No. 20250123 in the exported file.
- Write the variable name and the field name exactly, including upper and lower case:
[FileAs]works,[fileas]does not. - If the field doesn't exist or has no value, the placeholder is replaced with empty text.
- If eWay-CRM doesn't recognize the variable itself (the part before the square bracket), the placeholder stays in the result unchanged. This is how you spot a typo in a variable name.
Where You Can Use Placeholders
| Where | Where to set it up | Details |
| Templates for export to Word and PDF | eWay-CRM Online, Settings > Templates | Create and Edit Templates for Export to Word and PDF |
| Workflow actions (e.g. sending an email, setting a field value) | Administration Application, workflow diagrams | System Variables Available in Actions |
| File name when exporting to Word | Administration Application, global settings | Name of file created while exporting deal to Microsoft Word or sharing via email |
Variables Overview
| Placeholder | What it does |
| $CURRENT_ITEM[Field] | A field of the current item – the one being exported or whose workflow status is changing. |
| $CURRENT_ITEM_OWNER[Field] | A field of the user who owns the current item. |
| $CURRENT_USER[Field] | A field of the signed-in user who runs the export or makes the change. |
| $SUPERIOR_ITEM[Field] | A field of the superior item from which the current item was created. |
| $Folder_RELATIONTYPE_RELATION_ITEM[Field] | A field of an item from the Folder module linked by a relation of type RELATIONTYPE – see Related Items. |
| $XYZ_RELATION_ITEM[Field] | A field of the item selected in the relation field XYZ, e.g. $Customer_RELATION_ITEM[FileAs]. |
| $CUSTOMER[Field], $CONTACTPERSON[Field] | A field of the customer and the contact person of a deal. |
| $MY_COMPANY[Detail] | Your company details – see Your Company Details and System Data. |
| $SYSTEM_DATA[Detail] | System data, such as the default currency or today's date. |
How to Find a Field Name
The square brackets hold the database name of the field, not its label on the form. To find it:
- eWay-CRM Online: open an item and hover over the field. The database name appears in the tooltip.
- Administration Center: in the Fields section, select the module. The name is in the Database Field column.
- eWay-CRM Desktop: click into the field and press Alt + F1.
See How to Find the Database Name of a Default or Custom Field for details.
You can insert fields of all types, including custom fields (e.g. af_25). The text form of the value is always inserted: the name of the linked item for a relation field, Yes/No for a checkbox, and a date in the format of the template language for a date field.
Related Items
A variable in the form Folder_RELATIONTYPE_RELATION_ITEM returns items linked to the current item. Folder is the database name of the module (e.g. Companies, Contacts, Emails) and RELATIONTYPE is the relation type (e.g. CUSTOMER, CONTACTPERSON, OUTLOOKPROJECT). For the list of relation types and the modules they connect, see the relation types overview.
Examples for a deal:
$Companies_CUSTOMER_RELATION_ITEM[FileAs]– the customer's name$Contacts_CONTACTPERSON_RELATION_ITEM[Email1Address]– the contact person's email$Emails_OUTLOOKPROJECT_RELATION_ITEM[FileAs]– the subject of an email linked to the deal
In regular text, only the first related item is used. When the variable is in a table row of a Word template, the row is repeated for each related item. For details, see Create and Edit Templates for Export to Word and PDF.
Workflow actions in the item window also accept a variable named after a relation field: $Customer_RELATION_ITEM[FileAs] for the customer on a deal, or $af_123_RELATION_ITEM[FileAs] for a custom relation field. This form doesn't work in Word and PDF templates.
In the file name setting for exported deals, you can write the customer and the contact person in short form as $CUSTOMER[FileAs] and $CONTACTPERSON[FileAs].
Your Company Details and System Data
The MY_COMPANY variable inserts the details filled in under the Company Information global settings:
$MY_COMPANY[MyCompanyName]– company name$MY_COMPANY[MyCompanyStreet]– street$MY_COMPANY[MyCompanyZip]– ZIP code$MY_COMPANY[MyCompanyCity]– city$MY_COMPANY[MyCompanyId]– company registration number$MY_COMPANY[MyCompanyVatNumber]– VAT number
The SYSTEM_DATA variable inserts system data:
$SYSTEM_DATA[DefaultCurrency]– the default currency, e.g. USD$SYSTEM_DATA[CurrentDate]– today's date$SYSTEM_DATA[CurrentTime]– the current time
SQL Queries
In workflow actions and in the file name setting, you can enter an SQL query instead of fixed text. It always starts with the SQL# prefix, and placeholders are filled in before the query runs:
SQL#SELECT 'eWay-' + '$CURRENT_ITEM[FileAs]' + '-' + '$CUSTOMER[FileAs]'
Word and PDF templates don't evaluate SQL queries – the SQL#... text stays in the document unchanged.
Examples
Offer template for Word:
Offer No. $CURRENT_ITEM[FileAs] for $Companies_CUSTOMER_RELATION_ITEM[FileAs] Contact: $CURRENT_ITEM_OWNER[FileAs], $CURRENT_ITEM_OWNER[Email1Address] $MY_COMPANY[MyCompanyName], Reg. No. $MY_COMPANY[MyCompanyId]
Email subject in the Send Email workflow action:
$CURRENT_ITEM[FileAs] will be invoiced in $CURRENT_ITEM[Price]
File name when exporting a deal:
Offer-$CURRENT_ITEM[FileAs]-$CUSTOMER[FileAs]