How To: Search for multiple file types with an input widget



How can a form menu input widget present a list of multiple file types? For example, how can I configure this widget to display all polygon coverages and ASCII files with the .txt extension?


The [LISTFILE] and [FILELIST] functions can only search for one file type at a time. Since the results of a file search must be stored in a unique variable, multiple types can be handled via multiple variables that can be concatenated into one single variable for display. The example above can be solved as follows:

1) This aml searches for polygon coverages and text files:

&SETVAR text = [LISTFILE *.txt -FILE]
&SETVAR .list = %polys%,%text% /* Concatenate results
&MENU choice

2) This menu displays the contents of the global variable defined in the aml:

7 choice.menu
%list1 %quit
%list1 INPUT .selection 20 TYPEIN NO SCROLL YES ROWS 5 ~
CHOICE %.list%
%quit BUTTON KEEP 'quit' &RETURN