{"id":1579,"date":"2023-02-01T08:35:11","date_gmt":"2023-02-01T13:35:11","guid":{"rendered":"https:\/\/www.airsupervision.com\/wp-r\/docs\/general-knowledge\/writing-text\/using-dynamic-text\/"},"modified":"2026-10-22T11:04:58","modified_gmt":"2026-10-22T15:04:58","slug":"using-dynamic-text","status":"publish","type":"docs","link":"https:\/\/www.airsupervision.com\/wp-r\/docs\/general-knowledge\/writing-text\/using-dynamic-text\/","title":{"rendered":"Using dynamic text"},"content":{"rendered":"\n<p>Dynamic text lets you write a document or a message once and have AirSupervision fill in the personal details automatically for each person: name, licence number, address, the name of your organisation, today&#8217;s date, and so on.<\/p>\n\n\n\n<p>You place <strong>fields<\/strong> in your text. A field is a word between double braces, for example {{givenname}}. When the document is produced, sent or displayed, the field is replaced by the real information. &#8220;Dear {{givenname}} {{lastname}},&#8221; becomes &#8220;Dear Alex Martin,&#8221; for one member and &#8220;Dear Sam Taylor,&#8221; for another.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"638\" height=\"550\" data-id=\"1680\" src=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s2.png\" alt=\"\" class=\"wp-image-1680\" srcset=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s2.png 638w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s2-300x259.png 300w\" sizes=\"(max-width: 638px) 100vw, 638px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"826\" height=\"616\" data-id=\"1681\" src=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s3.png\" alt=\"\" class=\"wp-image-1681\" srcset=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s3.png 826w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s3-300x224.png 300w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2023\/02\/s3-768x573.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Where you can use dynamic text<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Where<\/th><th>How to add a field<\/th><th>Which fields<\/th><\/tr><\/thead><tbody><tr><td>Dynamic documents and other texts written with VisualText<\/td><td><strong>Portal Tags<\/strong> button &gt; Contact, System or Sender. The field appears as a small framed label.<\/td><td>Member, sender and system fields (see the reference below).<\/td><\/tr><tr><td>Text boxes with the BBCode toolbar and printing buttons<\/td><td><strong>Member&#8217;s fields<\/strong>, <strong>User&#8217;s fields<\/strong> or <strong>System fields<\/strong> menus. The field is written with its braces.<\/td><td>Member, user and system fields (see the reference below).<\/td><\/tr><tr><td>Automatic messages and emails set up by administrators (settings pages)<\/td><td>The default text already contains the fields that message can use. Keep them, move them, or delete the ones you do not need.<\/td><td>Fields specific to each message, for example the student&#8217;s name and the lesson title in a lesson notification.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"910\" height=\"473\" src=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-editor-overview.png\" alt=\"VisualText editor with its toolbar and a sample document containing tags, a table, form fields and page layout markers\" class=\"wp-image-5561\" srcset=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-editor-overview.png 910w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-editor-overview-300x156.png 300w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-editor-overview-768x399.png 768w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption class=\"wp-element-caption\">In VisualText, fields appear as small framed labels, here &#8220;givenname&#8221;, &#8220;lastname&#8221; and &#8220;company_name&#8221;. They are replaced by the real information when the document is produced.<\/figcaption><\/figure>\n\n\n<div class=\"ub-styled-box ub-notification-box\" id=\"ub-styled-box-16d4116e-9a8a-4efe-9299-a50631ca34f9\">\n\n\n<p><strong>Tip:<\/strong> A field only works where it is offered. A field copied from one automatic message into another one, or from a dynamic document into a message, may stay empty or appear as typed.<\/p>\n\n\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Member, sender and system fields<\/h2>\n\n\n\n<p>These fields are used in dynamic documents and in texts with the printing buttons.<\/p>\n\n\n\n<ul class=\"wp-r_indent50\">\n<li><strong>Member fields<\/strong> (Contact in VisualText, Member&#8217;s fields in BBCode) give the details of the person the document is about, for example the member whose file you are printing.<\/li>\n\n\n\n<li><strong>Sender fields<\/strong> (Sender in VisualText, User&#8217;s fields in BBCode) give your own details, as the person who produces the document. They are written with <strong>my_<\/strong> in front, for example {{my_lastname}}.<\/li>\n\n\n\n<li><strong>System fields<\/strong> give the details of your organisation and the date.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Member fields<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Field<\/th><th>What it shows<\/th><\/tr><\/thead><tbody><tr><td>{{lastname}}<\/td><td>Last name.<\/td><\/tr><tr><td>{{givenname}}<\/td><td>Given name.<\/td><\/tr><tr><td>{{givennameplus}}<\/td><td>Other given names.<\/td><\/tr><tr><td>{{sup_inst_sexe}}<\/td><td>Gender: male, female, or N\/A when not set.<\/td><\/tr><tr><td>{{licnumber}}<\/td><td>Licence number.<\/td><\/tr><tr><td>{{dob}}<\/td><td>Date of birth (N\/A when not set).<\/td><\/tr><tr><td>{{sup_inst_pob}}<\/td><td>Place of birth.<\/td><\/tr><tr><td>{{citizenship}}<\/td><td>Citizenship (country name).<\/td><\/tr><tr><td>{{visa}}<\/td><td>Immigration visa expiry date (N\/A when not set).<\/td><\/tr><tr><td>{{address}}<\/td><td>Address.<\/td><\/tr><tr><td>{{address_post}}<\/td><td>Postal address.<\/td><\/tr><tr><td>{{phone1}}, {{phone2}}<\/td><td>Phone numbers. Empty when not set.<\/td><\/tr><tr><td>{{cell1}}, {{cell2}}<\/td><td>Cell phone numbers. Empty when not set.<\/td><\/tr><tr><td>{{fax}}<\/td><td>Fax number.<\/td><\/tr><tr><td>{{skype}}<\/td><td>Skype ID.<\/td><\/tr><tr><td>{{email}}<\/td><td>Email address.<\/td><\/tr><tr><td>{{groupe}}<\/td><td>Group name (&#8220;no group&#8221; when the member has none).<\/td><\/tr><tr><td>{{res_name}}<\/td><td>Emergency contact: name.<\/td><\/tr><tr><td>{{res_parent}}<\/td><td>Emergency contact: relationship.<\/td><\/tr><tr><td>{{res_address}}<\/td><td>Emergency contact: address.<\/td><\/tr><tr><td>{{res_phone1}}, {{res_phone2}}<\/td><td>Emergency contact: phone numbers.<\/td><\/tr><tr><td>{{res_email}}<\/td><td>Emergency contact: email.<\/td><\/tr><tr><td>{{role}}<\/td><td>Roles.<\/td><\/tr><tr><td>{{roleDetail}}<\/td><td>Roles with their description.<\/td><\/tr><tr><td>{{sup_resp}}<\/td><td>Responsibilities.<\/td><\/tr><tr><td>{{sup_tache}}<\/td><td>Tasks.<\/td><\/tr><tr><td>{{courses}}<\/td><td>List of the courses the member is enrolled in.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Sender fields<\/h3>\n\n\n\n<p>Add <strong>my_<\/strong> in front of any member field to show your own details instead, for example {{my_givenname}} {{my_lastname}}, {{my_licnumber}} or {{my_email}}.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">System fields<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Field<\/th><th>What it shows<\/th><\/tr><\/thead><tbody><tr><td>{{company_name}}<\/td><td>Name of your organisation.<\/td><\/tr><tr><td>{{company_address}}<\/td><td>Address of your organisation.<\/td><\/tr><tr><td>{{company_location}}<\/td><td>ICAO location code of your organisation.<\/td><\/tr><tr><td>{{company_website}}<\/td><td>Website address of your organisation.<\/td><\/tr><tr><td>{{admin_email}}<\/td><td>Email address of the administrator.<\/td><\/tr><tr><td>{{sysdate_yyyymmdd}}<\/td><td>The date the document is produced, as 2026-10-22.<\/td><\/tr><tr><td>{{sysdate_ddMMyyyy}}<\/td><td>The date the document is produced, as 22 Oct 2026.<\/td><\/tr><tr><td>{{sysdate_DMddyyyy}}<\/td><td>The date the document is produced, as Thu 22 Oct 2026.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"184\" height=\"185\" src=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/bb-system-fields.png\" alt=\"System fields menu with the company details and three system date formats\" class=\"wp-image-5579\" srcset=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/bb-system-fields.png 184w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/bb-system-fields-150x150.png 150w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/bb-system-fields-100x100.png 100w\" sizes=\"(max-width: 184px) 100vw, 184px\" \/><figcaption class=\"wp-element-caption\">The System fields menu of a BBCode text box. The dates shown in the menu are only examples: the field always shows the date of the day the document is produced.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"357\" height=\"330\" src=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-portal-tags.png\" alt=\"Portal Tags menu with the Contact, System and Sender groups\" class=\"wp-image-5567\" srcset=\"https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-portal-tags.png 357w, https:\/\/www.airsupervision.com\/wp-r\/wp-content\/uploads\/2026\/10\/vt-portal-tags-300x277.png 300w\" sizes=\"(max-width: 357px) 100vw, 357px\" \/><figcaption class=\"wp-element-caption\">In VisualText, the Portal Tags button lists the same fields under Contact, Sender and System.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Text that changes with a value<\/h2>\n\n\n\n<p>A field can also show a different text depending on its value. Write the field name, a vertical bar |, then pairs of <strong>value:text<\/strong> separated by semicolons:<\/p>\n\n\n\n<p>{{field|value:text;value:text}}<\/p>\n\n\n\n<p>The most useful example is the polite form depending on the gender (1 = male, 2 = female):<\/p>\n\n\n\n<p>Dear {{sup_inst_sexe|1:Sir;2:Madam}},<\/p>\n\n\n\n<p>A male member reads &#8220;Dear Sir,&#8221; and a female member &#8220;Dear Madam,&#8221;. If the value matches none of the pairs, nothing is shown.<\/p>\n\n\n\n<p>Rules for the texts:<\/p>\n\n\n\n<ul class=\"wp-r_indent50\">\n<li>Use only letters (accented letters are allowed), numbers, spaces and full stops.<\/li>\n\n\n\n<li>Do not use commas, apostrophes, hyphens or brackets inside the texts: the field would then be shown as typed.<\/li>\n\n\n\n<li>Write each value exactly as it is stored (for gender: 1 or 2).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Fields in automatic messages<\/h2>\n\n\n\n<p>Administrators can change the wording of automatic messages and emails in the settings pages (for example notifications about lessons, credentials, audits, qualifications or registrations). The default text of each message already contains the fields it can use, such as {{_studentname}}, {{_lessontitle}} or {{_auditor_name}}.<\/p>\n\n\n\n<ul class=\"wp-r_indent50\">\n<li>Keep the field exactly as written, including the braces and the underscore.<\/li>\n\n\n\n<li>You can move a field to another place in the text, or delete it.<\/li>\n\n\n\n<li>Do not invent new fields: only the fields of the default text are filled in for that message.<\/li>\n\n\n\n<li>Before changing a message, copy its text somewhere safe so you can put it back if needed.<\/li>\n<\/ul>\n\n\n\n<p>These fields can also be used in most automatic messages:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Field<\/th><th>What it shows<\/th><\/tr><\/thead><tbody><tr><td>{{_myusername}}<\/td><td>Your last name and given name.<\/td><\/tr><tr><td>{{_myemail}}<\/td><td>Your email address.<\/td><\/tr><tr><td>{{_myphone1}}, {{_myphone2}}<\/td><td>Your phone numbers.<\/td><\/tr><tr><td>{{_mycell1}}, {{_mycell2}}<\/td><td>Your cell phone numbers.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The signature added to text messages (SMS) uses its own fields, listed in the help window of that setting:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Field<\/th><th>What it shows<\/th><\/tr><\/thead><tbody><tr><td>{{_act_name}}<\/td><td>Last name and first initial of the person sending the message.<\/td><\/tr><tr><td>{{_act_licnumber}}<\/td><td>Licence number of the sender.<\/td><\/tr><tr><td>{{_act_ph1}}, {{_act_ph2}}<\/td><td>Phone numbers of the sender.<\/td><\/tr><tr><td>{{_act_c1}}, {{_act_c2}}<\/td><td>Cell phone numbers of the sender.<\/td><\/tr><tr><td>{{_act_date}}<\/td><td>Date of sending.<\/td><\/tr><tr><td>{{_act_time}}<\/td><td>Time of sending.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Common problems and solutions<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Problem<\/th><th>Why it happens<\/th><th>What to do<\/th><\/tr><\/thead><tbody><tr><td>The reader sees {{givenname}} instead of the name.<\/td><td>A brace is missing, or the field name is misspelled.<\/td><td>Use the menu or the Portal Tags button to insert the field instead of typing it.<\/td><\/tr><tr><td>The field is empty.<\/td><td>The information is not filled in in the member&#8217;s profile, or the field is not available on this page.<\/td><td>Complete the profile, or use a field offered on this page.<\/td><\/tr><tr><td>The gender shows &#8220;N\/A&#8221;.<\/td><td>The gender is not set in the profile.<\/td><td>Complete the profile, or rephrase the text.<\/td><\/tr><tr><td>A text with values ({{field|&#8230;}}) is shown as typed.<\/td><td>The texts contain a comma, an apostrophe or another forbidden character.<\/td><td>Use only letters, numbers, spaces and full stops in the texts.<\/td><\/tr><tr><td>My details appear instead of the member&#8217;s.<\/td><td>A <strong>my_<\/strong> field was used.<\/td><td>Use the field without my_ for the member&#8217;s details.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Quick best practices<\/h2>\n\n\n\n<ol class=\"wp-r_indent50\">\n<li>Insert fields with the buttons and menus rather than typing them.<\/li>\n\n\n\n<li>Check the result with the PDF preview before sending or printing for many people.<\/li>\n\n\n\n<li>Make sure profiles are complete: a field can only show what is stored.<\/li>\n\n\n\n<li>In automatic messages, keep the fields that are already there and do not add new ones.<\/li>\n<\/ol>\n\n","protected":false},"featured_media":0,"parent":1573,"menu_order":1,"template":"","doc_tag":[],"_links":{"self":[{"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs\/1579"}],"collection":[{"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/types\/docs"}],"version-history":[{"count":9,"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs\/1579\/revisions"}],"predecessor-version":[{"id":5582,"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs\/1579\/revisions\/5582"}],"up":[{"embeddable":true,"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs\/1573"}],"next":[{"title":"Using VisualText module","link":"https:\/\/www.airsupervision.com\/wp-r\/docs\/general-knowledge\/writing-text\/using-visualtext-module\/","href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs\/3598"}],"prev":[{"title":"Using BBCODE","link":"https:\/\/www.airsupervision.com\/wp-r\/docs\/general-knowledge\/writing-text\/using-bbcode\/","href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/docs\/1578"}],"wp:attachment":[{"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/media?parent=1579"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.airsupervision.com\/wp-r\/wp-json\/wp\/v2\/doc_tag?post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}