Developer Documentation Library > Scripting > mrScriptMetadata User’s Guide > mrScriptMetadata reference > Names and labels
 
Names and labels
Names
mrScriptMetadata has these types of names:
field names
category names (in a field’s category and codes lists)
category list names
area names, which are used to define alternative label, user context, and language combination: see Alternative labels.
Names must conform to the mrScriptBasic rules for regular identifiers: see Naming conventions.
Names can be any of the reserved keywords: see Keyword summary.
There are additional rules for field and category names:
Field names
Some field names are reserved for the definition of standard messages: see Custom message texts.
The field name HDATA is reserved for setting labels, custom properties, styles, and templates on the document.
You can enclose field names in " " (quotation marks) to escape keywords, for example: "Column".
Category names
Category full names must be unique within the question.
You can enclose field names in " " (quotation marks) to escape keywords, for example: "Column".
Labels
The label is typically the question or category text that is displayed to the respondent.
The percent symbol (%) is an escape character, which allows you to give the characters that directly follow the percent symbol an alternate meaning. You can use the following character combinations:
Characters
Result
%n
Inserts a carriage return and line feed character (new line)
%{
Inserts the literal character { instead of a creating a text insertion point
%
not followed by n or {
Inserts the literal character %
%%n
Inserts the literal characters %n instead of inserting a line break
%%{
Inserts the literal character % followed by a text insertion point ({).
Escape characters
Some characters have special meanings in HTML. For example, < indicates the start of a tag. If you want to use these characters in labels, you must replace them with codes, so that mrScriptMetadata does not read them as HTML characters. These are some common characters that must be encoded:
Character
Replacement code
&
&amp;
<
&lt;
>
&gt;
"
&quot;
'
&apos;
Characters that are actually used as tags in well-formed HTML do not require encoding. To create well‑formed HTML, make sure that there is an opening tag and a closing tag, and that tags are properly nested.
You can also add text insertions to the label, for example, to include the answer to a previous question: see Label text insertion.
If you do not specify a label, it will be the same as the field or category name.
By default, the label is in the default language, user context, and label type defined for the metadata section. However, you can optionally specify a different language, user context, and label type: see Alternative labels.
Examples of using the escape characters to format labels
Label that includes
Label code
End result
HTML markup for bold
Here is some <b>bold</b> text
Here is some bold text
A new line character (%n)
This is line 1 of the label.%nThis is line 2 of the label.
This is line 1 of the label.
This is line 2 of the label.
HTML markup for line break
This is line 1 of the label.<br/>This is line 2 of the label.
This is line 1 of the label.
This is line 2 of the label.
HTML markup for the ‘less than’ symbol
X &lt; Y
X < Y
A literal percent symbol (%)
You said that you spent {PercentTimeSpent}% time at work.
You said that you spent N% time at work.
(where N is the value of {PercentTimeSpent})
A percent symbol as an escape character
Time spent at work: %%{PercentTimeSpent}
Time spent at work: %N
(where N is the value of {PercentTimeSpent}).
HTML hyperlink that opens in a new browser window
<a href=' https://www.unicomsi.com/about/'
rel='noopener noreferrer' target='_blank'>About Us</a>
About Us
HTML hyperlink that opens an interview
<a href=' https://cloud.unicomsi.com/mrIWeb/mrIWeb.dll?I.Project=MUSEUM&amp;Id=ID1'
rel='noopener noreferrer' target='_blank'>Click here to start interview</a>
Click here to start interview
See
mrScriptMetadata reference