02. Codes
5 people found this article helpful
About codes
- You can use codes to automatically input relevant information in documents and templates.
- The information you've asked for by inputting a code will be generated when an e-mail or sms is sent, or when the user opens a document or course certificate.
- You will find the list of codes at the bottom of a document/ template, after clicking Edit.
- NB!
- You must use the entire code with all the symbols. For example, to use the code for the first name of a user, use the entire string: #%user.firstname%#.
- Example of how to use the code: Hi, #%user.firstname%#! You are now enrolled to the course #%course.name%#.
- You must use the entire code with all the symbols. For example, to use the code for the first name of a user, use the entire string: #%user.firstname%#.
Using codes in notifications
The codes can be used in notifications sent by e-mail or SMS. Please note that there are separate codes for courses and for competences.
A competence notification should not contain codes that apply to courses, and vice versa.
Customize date format
Codes marked with a star * contain a date format that can be customized.
Example
A user's date of birth has this code #%user.birthdate%#. The code generates the date based on this format YYYY-MM-DD.
By adding another date format to the code, the code can be customized:
Desired date format | Example | Use this code |
---|---|---|
DD-MM-YYYY | 21-08-2015 | #%user.birthdate$dd-MM-yyyy%# |
DD.MM.YYYY | 21.08.2015 | #%user.birthdate$dd.MM.yyyy%# |
YYYY/MM/DD | 2015/08/21 | #%user.birthdate$yyyy/MM/dd%# |
DD/MM/YYYY | 21/08/2015 | #%user.birthdate$dd/MM/yyyy%# |
DD/MM-YYYY | 21/08-2015 | #%user.birthdate$dd/MM-yyyy%# |
DD.nameOfMonth YYYY | 21. Aug 2015 | #%user.birthdate$dd.MMM yyyy%# |