With the advent of The OnExitSet and OnEnterSet Commands, it became possible to have the captions (or footing text or heading text) of a data element in the interview change in response to the user entering data.
Getting the features around this to work was not all that easy for the template author, and so now we have introduced the concept of the Dynamic Caption. This feature also applies to heading and footing text.
Suppose you want the First Name, Last Name and Date of Birth of someone to be entered in the interview. In the case where there are a number of names of various parties to be entered, it might become confusing, when it comes to the Date of Birth, as to whose Date of Birth should be entered.
Here’s an example of how a dynamic caption would make it easier for the user:
«Caption(DateOfBirth,Enter the Date of Birth of <FirstName||[First Name of Person]> <LastName||[Last Name of Person]>)»
When the interview is first displayed, the caption for the Date of Birth will read:
Enter the Date of Birth of [First Name of Person] [Last Name of Person]
If the value “John” is entered for FirstName and “Smith” for LastName, then as soon as those values have been typed in, then caption for Date of Birth will read:
Enter the Date of Birth of John Smith
In the above fillpoint, the text in [ ] after the || represents text which should appear on the interview before the user has entered any data for the First_Name or Last_Name fields.
Some Advanced Techniques
If you are going to need the FirstName and LastName in a number of different captions (or headings or footings) in the interview, then you could define the dynamic caption in a Script, and use that Script name where ever you want the dynamic caption. For example:
«Script(FullName)»«concat(FirstName, ' ', LastName)»«ScriptEnd()» «FirstName» «LastName» «FormatDate(DateOfBirth,’mmmm d, yyyy’)» «RegistrationCertificate» «Caption(DateOfBirth,Enter the Date of Birth of <FullName()||[Primary Contact]>)» «Footing(RegistrationCertificate,|Make sure the the Registration Certificate for <FullName()||[Defendant Name]> is available.)»