This command is used to force the capture of a field onto the interview.
Command structure:
«CaptureDataElement(Name)»
Examples of usage:
If a data element does not pass the XpressDox relevance rules and does not automatically appear on an interview, this command can be used to place it on the interview anyway.
Another reason to use it would be to change the sequence in which the data element is placed on the interview, relative to other data elements on the interview. The sequence in which data elements appear on the interview is the sequence in which they were first encountered in the template. So, to move a data element higher up in the interview, all that is necessary is to place a CaptureDataElement command referring to that data element, in the place in the interview before the other data elements that should appear after it in the interview.
Capture more than one data element in one command:
«CaptureDataElement(Name,Address,DateOfBirth)»
Capture a data element as a date:
«CaptureDataElement(DateOfBirth,date)»
Capture a data element as a number:
«CaptureDataElement(Loan_Amount,decimal)»
Some things to note:
- The
CaptureDataElement
command was originally calledDefineDataElement
, which can still be used, for backward compatibility. - The Manage Interview, introduced in v14, makes it much easier to move fields around in the interview. Now you can simply drag and drop!
- Using the Question command, also introduced in v14, you can state that a Question is for Capture purposes only.