ChooseFromList – XpressDox

This is a command which will present the user (via the interview) with a list of options from which to choose the value of a data element rather than a free-format text field.

 

Command structure:


I live in «ChooseFromList(State,Alabama,Alaska,Arizona,Arkansas,California,Colorado,
Connecticut,Delaware,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,
Louisiana,Maine,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana,
Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,North Carolina,North Dakota,Ohio,Oklahoma,
Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,
Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming)» «ToUpper(State)»

 

 

Inserting the answer into the document:

It is all very well presenting a list of States to the user, but if you want the State that the user chooses to appear in the document then it is important to include a fillpoint indicating where the result of the data capture must be inserted – hence the «ToUpper(State)» in the example. If this is omitted then the result of the list will not appear in the document.

 

 

Using the result in Document Logic:

The above might seem a bit obvious – obviously you would want the result of the list in the document. But perhaps you don’t. Perhaps you have asked the user if the Party Type is a Company or an Individual. It would not be necessarily be right to put the words Company or Individual on the document, but rather ask further questions based on the result of the list.


«ChooseFromList(PartyType,Individual,Company)»
«if(PartyType = ‘Individual’)»
«Name», «SSN», «MaritalStatus»
«Else»
«CompanyName», «CompanyRegNo»
«End()»

 

 

Why would my list not be showing in the interview?

In fact unless the result of the list is used anywhere in the template, either in an If command or by inserting the result into the document, the list will not appear on the interview.

 

 

The Question command in v14:

The concept of Low Code authoring was introduced in v14, and with that the Question command. It is now possible to insert a List Question into the template without the need for ChooseFromList and a separate fillpoint. Inside the Question command, select List and enter your options. You can state whether the result is to be inserted into the document, or if it is for capture purposes only (as it usually would be in the case of document logic).