Use Google to find help fast. For example, search on "xpressdox choosefromlist".

The GetListItem Function

The GetListItem Function

This function is used to extract a value from a list. In the first example, the data element contains a number (an integer) which is used to get an item from a list, where the list is coded in the fillpoint itself:

<<GetListItem(BondNumber,'First,Second,Third,Fourth,Fifth,Big',',')>>

If the value of the ‘BondNumber’ data element is 2, then the result of this fillpoint function is the string ‘Second’. If the value is not an integer, or is less than or equal to 1, then the result returned is ‘First’, and if the value is 6 or more, then the result is ‘Big’.

Both the Item Number and List itself can be either hard coded (as is the case with the list in the above example) or can be the result of a call to a function, or can be a data element value:

<<GetListItem(50,FullNames,' ')>>

If FullNames was “Johannes Stephanus Paulus Cilliers” then the above function would return “Cilliers” – in other words the surname. That is why the value of 50 was used, as it is probably longer than any number of names given to anyone and so will always select the last name in the list.

Leave a Reply