Scripting > mrScriptMetadata User's Guide > mrScriptMetadata reference > Relative name references
 
Relative name references
When you create simple questions in mrScriptMetadata, you can generally refer from one question to another by using the name of the question that you want to refer to. However, if the script also includes loops, grids compounds, blocks, or pages, you might need to use special operators in those fields to be able to refer to other questions in those fields or questions outside of those fields.
Document-level operator: \\.
\\. refers to a question at the document (script) level from another question that is not at the document level.
The following example shows a grid called RatingGrid that contains a categorical question called Rating. Because Rating is not at the document level, it can refer to RatingCategories, a defined list at the document level, by using the document-level operator:
RatingCategories define
{
Like,
NoOpinion "No Opinion",
DontLike "Don't like"
};

RatingGrid "Rate the following drinks" grid
{
Tea,
Coffee,
HotChocolate "Hot Chocolate"
}
fields
(
Rating categorical [1]
{
categories Use \\.RatingCategories
};
);
If mrScriptMetadata can not find a question at the same level, it looks for the question at the document (script) level. So the document-level operator can usually be omitted.
See
mrScriptMetadata reference