Incontrol is built around the powerful Form Builder. With aliases, you can reuse data entered in your form in other places. This way, you get more out of Incontrol and work more efficiently.
In this article, you will learn what aliases are, how to set them up, and how to use them.
Table of Contents
What are aliases?
An alias is a unique name that you assign to a form element. This allows you to reuse the entered value in other places, such as in static text or a document. With an alias, you can perform various actions and link data together.
Setting up aliases
You can set an alias for most form elements and automatic numbering.
Here's how to do it:
-
Open the settings of the form element.
-
Enter a logical name in the Alias field.
-
Click the text to the right of the alias field to automatically use the label.
-
You can also click directly on the alias in the element to edit it.
Tip: Use a logical name so you can easily remember which alias corresponds to which element later.
Note: Only elements with an alias can be exported.
Reusing an entered value in static text
Thanks to aliases, you can reuse values entered by the user in a form within static text.
Example:
A Text element has the alias "voornaam". The user enters "Frits". In static text, you type @voornaam, and Incontrol will display "Frits".
Note: If there are multiple elements with the same alias, Incontrol will separate the values in the static text with a comma.
Example:
Two Text elements both have the alias @voornaam. The user enters "Piet" and "Klaas". In the static text, it will appear as: "Piet, Klaas".
Using automatic numbering
You can reuse an automatic numbering in static text by placing the alias after a $ symbol instead of an @ symbol.
Example:
$nummering_id displays the generated number.
Good to know:
Since both the $ and @ symbols are recognized as automatic numbering and alias markers in the application, you cannot use them freely in static text.
For example, to display an email address, use @@ for an @ symbol and $$ for a $ symbol.
Example:
Type in the static text:
support@@incontrol.app
This will be displayed as:
support@incontrol.app
Static aliases from server data
Some data is known on the server or from the system. You can use this data in your static text or PDF templates by using the corresponding alias.
Below is an overview of the available static aliases and what they display.
Alias | Description | Visible on? |
@user.name | The name of the user | PDF & Web |
@user.firstname | The first name of the user | PDF & Web |
@user.lastname | The last name of the user | PDF & Web |
@user.email | The email address of the user | PDF & Web |
@user.reference | The reference value of a user determined by the Public API or the Content Management System (CMS) | PDF & Web |
@user.* | The value that is set in an additional field created for the user | PDF & Web |
@organization.name | The name of the organization | PDF & Web |
@organization.reference | The reference value of an organization determined by the Public API or the Content Management System (CMS) | PDF & Web |
@organization.* | The value that is set in an additional field created for the organization | PDF & Web |
@form.name |
The name of the form | Always visible |
@form.reference |
The reference value of a form determined by the Public API or the Content Management System (CMS) | Always visible |
@draft.name | The name of the draft | Always visible |
@draft.datetime | The time and date of the creation of the draft as code (yyMMdd-HHmmss) | |
@draft.date | The date on which the draft was created | |
@draft.time | The time of the creation of the draft | |
@draft.reference | The reference value when the draft was created with the Public API | |
@document.time | The time of the PDF | |
@document.datetimecode | The time of the PDF as code (yyMMdd-HHmmss) | |
@document.datetime | The date and time of the PDF | |
@document.date | The date of the PDF | |
@document.name | The name of the document | |
@document.outputname | The name of the document if it differs from @form.name |
Example with user
The logged-in user is Piet Jansen
-
@user.firstname displays Piet
-
@user.lastname displays Jansen
-
@user.name displays Piet Jansen
Example with document datetime
The draft starts on 2020-05-01 at 11:00 and is completed on 2020-05-02 at 03:00.
${@document.datetime-@draft.datetime} displays 4 hours.
Scoped aliases in dynamic content
Aliases display entered data again, including data within dynamic content.
When using aliases in dynamic content, you'll often want to use a scoped alias. This is an alias with a dot in front of it.
Example:
-
@alias (normal alias) displays all values with that alias from the entire form, separated by commas.
-
@.alias (scoped alias) displays only the value within the specific dynamic content.
Scoped aliases are especially useful when working with the repeater element.