Sort a Repeated Dialog
When users enter a list of answers in a repeated dialog, you can sort the answers in ascending or descending order when they are merged into the assembled document. (Use the ASCEND and DESCEND instructions.) However, you may also want the answers to appear in the same order when they are viewed in the interview. For example, if an answer file already contains a list of attorney names, displaying those names in alphabetical order in the interview would make it easier for the user to know whether all names are listed or not.
To make sure answers are listed in the correct order in a dialog, users can either enter the answers in the correct order from the start, or you can add a script link dialog element to the repeated dialog that users can click to automatically sort their answers. Using this method, the answers will actually be sorted in the dialog instead of just sorted at the time answers are included in the assembled document. Likewise, the answers are sorted in the answer file.