Is This Content Helpful?
We're glad to know this article was helpful.
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 polys = [LISTFILE * -COVER -POLY]
&SETVAR text = [LISTFILE *.txt -FILE]
&SETVAR .list = %polys%,%text% /* Concatenate results
2) This menu displays the contents of the global variable defined in the aml:
%list1 INPUT .selection 20 TYPEIN NO SCROLL YES ROWS 5 ~
%quit BUTTON KEEP 'quit' &RETURN