The ChooseFromList Command

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.

 

 

Related articles:

ChooseFromRDBList

ChooseFromHzRDBList

Table of Contents