Index
Video Courses
Watch structured video courses
Knowledge Base
Visit our User Forum for discussions & solutions
Caption - XpressDox
The XpressDox caption command is used to replace the default field name shown as the question label in the interview with something more descriptive and readable.
Command structure:
«Caption(FieldName,Descriptive caption text)»
Examples of usage:
Simple example:
«FirstName»
«Caption(FirstName,First Name of Defendant)»
Style the caption with a font and color:
The caption text supports styling using modifiers. When using the Command Assistant to add a caption, these modifiers are applied automatically via a built-in text editor. They are included here for reference, as they will appear in the template code once the caption has been configured through the Command Assistant.
«Caption(FirstName,^b^@Blue/Microsoft Sans Serif/10@First Name of Defendant»
Style a portion of the text:
«Caption(FirstName,@Blue/Microsoft Sans Serif/10@^b^First Name^be^ of Defendant»
Use data captured into a field in your caption:
«FirstName»
«DOB»
«Caption(DOB,Enter the date of birth of <FirstName>)»
Dynamic caption based on a condition:
The caption text can be made conditional using an inline expression. In this example, the caption for the «Price» field changes depending on whether GST applies:
«ChooseFromRDBList(GST_YN,Yes,No)»«GST_YN»
«Price»
«Caption(Price,<iif(GST_YN = 'Yes','Contract Price incl GST','Contract Price')>)»
Alternatively, if the logic is more complex or you want to reuse it, the same result can be achieved using a Script:
«Caption(Price,<FixCaption()||Price>)»
«Script(FixCaption)»
«iif(GST_YN = 'Yes','Contract Price incl GST','Contract Price')»
«ScriptEnd()»
Note: With the introduction of the Question command in v14, a Caption can be specified inside the Question. Similarly, a Caption can also be specified when using a Define (not only v14).
Related articles
Changing captions dynamically
Changing the caption on repeating data
Aligning captions
Styling captions