Placeholder
In order to keep the process as flexible and reusable as possible, it is often necessary to replace certain text modules in an e-mail or a form with different values. In the case of a holiday request, for example, it could be that you want to send an email to the manager of a person in which the details of the holiday are listed. Here, of course, the period in which leave is taken is different for each version. For example, the e-mail text could look like this:
Hello {{NAME OF MANAGER}},
{{NAME OF THE APPLICANT}} has requested leave {{START HOLIDAY}} to {{END HOLIDAY}}.
linqi offers placeholders for the flexible design of texts, conditions, etc. You can use placeholders to insert text modules that are replaced by the specific value when a process is executed.
Use of placeholders
Whenever you see one of these buttons in linqi above a text field, you can insert a placeholder:
- : This button allows you to insert a simple placeholder. These can, for example, reference form values, user values or data from external systems and are then replaced with the entered form value, for example, when the process is executed.
- : This button allows you to insert a calculated value. This can be, for example, a mathematical calculation or the number of days between two dates.
As soon as you click on one of these buttons, a window opens in which you can define which value you want to reference or calculate. As soon as you confirm this configuration by ticking the box at the bottom of the window, the placeholder is inserted. This is highlighted as a coloured block.
You can edit a placeholder again by double-clicking on it and then apply the changes again by clicking on the tick. You can use the X on the right-hand side of an inserted placeholder to delete it again.
Available placeholders
The available placeholders adapt to the target field. For example, it makes no sense to enter the link to the process in a person field for authorisation assignment. For this reason, the available placeholders vary depending on the target field.
The following placeholder groups are available in linqi:
- General:
In this group you will find values such as the current date, the person who is currently logged in, etc. For example, you can insert the date on which the document was generated into a document template. - Process values:
Under this group you will find values that relate to the current process. This can be, for example, the process number, the status of the process, the link to the current process or the person who started the process or their manager. - Form value:
You can use this group to reference values that have been entered in forms. Each inserted control element is automatically available as a placeholder.
Note: If a control element is not yet displayed, you may still need to save the form. - Lookup list value:
Here it is possible to load a value from a lookup list. In this way you can, for example, load a different person responsible depending on the department, or the price of a product. - Fixed user / group:
This placeholder offers you a field to select one or more persons or groups. This is particularly useful if you want to authorise a specific group or, for example, load a person's e-mail address. - Person search:
Here you can load people based on their properties. For example, you can load all persons who work in a certain department and then authorise them or, for example, start a process for each of these persons. - Action nodes:
Various action nodes provide placeholders. This allows you to reference data loaded from an external system, for example, and insert it as a default value for a control element in a form. Details can be found on the help pages of the various external systems. - Process documents:
If you attach a document to a process, you can reference it here. For example, you can attach a fixed document (such as an information document) in an e-mail. - Document template:
Within the header and footer area, you can use these placeholders to insert the current page number as well as the number of pages. - PDF export template:
If you define a document template for exporting a BPMN 2.0 process to PDF, you can use it to reference the graphical representation of the process, metadata etc. In this way, you can create a template with very high reusability.
Calculated values / expressions
In addition to the placeholders, the following functions are available to calculate values:
- Conditional value:
You can use this function to vary a displayed value based on a condition. For example, you can display Approved or Not approved based on a previous step.
To do this, you must first specify a condition in the configuration and then the values that should be used if the condition is met or not met. - Calculation:
This function allows you to perform classic calculations, similar to Excel. You can use the operators + (addition), - (subtraction), * (multiplication) and / (division).
You can also define a default value that is used if no value can be calculated. This can happen, for example, if a placeholder is referenced but has not yet been filled in. - Convert file to Base64:
Here you can specify a file to convert the content to Base64. This can be helpful, for example, if you want to transfer files to Webservices. - Modify date:
You can use this function to add a few days to a date, for example.
To do this, enter the initial date via a placeholder under Date.
Type of modification specifies whether you want to add minutes, hours, days, months or years.
Value to be added defines how many minutes, hours etc. you want to add. You want to add. If you want to subtract a value, you can simply enter a negative value.
You can use Default value to specify a value that is used if the calculation cannot be performed. This can happen, for example, if a placeholder is referenced but has not yet been filled in. - Date difference:
You can use the date difference function to calculate the number of vacation days, the number of travel days, etc., for example.
In the configuration, you can enter the later date (To) as well as the earlier date (From).
The type of calculation determines whether you want to calculate the difference in minutes, hours, days, months or years.
You can also specify whether weekends should be excluded from the calculation.
Note: The difference between the same day is 0, i.e. today - today is 0. This is relevant if, for example, vacation days are calculated. In this case, you may have to add a day to the result via the calculation expression. - Set date value:
In some cases, you may always want to have the first of a month (or similar). This function exists for this purpose.
You enter the starting date to be modified as the date. This could be the current date, for example.
As the value that is set, you can select whether you want to adjust the minutes, hours, day, month or year.
The new value then defines the new day or month of the date, for example.
For example, if you enter Current date as the date, Day as the value to be set and 1 as the new value, you will always get the first of the current month as the result. - Fill text:
This function adds a filler text to a given text until a defined target length is reached. This is ideal for formatting or standardizing text lengths in consecutive numbers, for example.
Enter the text to be padded as the text.
For Text to be padded with, enter the text that will be inserted until the target length is reached. This could be 0, for example.
Direction specifies whether the text is filled from the left or right.
The target length defines the desired total length of the result. - Replace text:
You can use this function to replace words or sections in a text.
Text defines the text that is to be adapted.
Text to be replaced specifies the text to be searched for and replaced.
New text specifies the text to be used instead of the text found. - Extract text:
You can use this function to filter out specific information from a text - for example, an e-mail address, a date or a zip code. You specify the type of text to be searched for and the function will find exactly this position for you.
A so-called search pattern is used (a so-called "regular expression" or regex for short). This is a precise description of how the text you are looking for is structured.
Text defines the text that is searched, e.g. the content of an email.
Regex defines the regex that is used for the search. The value of the first group (the first value in brackets) is used as the result of this function.