The Retrieve Values attribute can be used to dynamically retrieve valid values for a property at run time. The attribute requires an action descriptor to be referenced, which must contain a tool that returns a list of values. A file descriptor must be used to model the tool's output.
The Retrieve Values action can only be executed in a modeled input dialog. See Open Modeled Dialog for more information.
The manner in which the values for the field in the dialog are retrieved is determined by the Mode attribute of the corresponding property. The Mode values are:
The label of the Retrieve button can be customized using the attribute Retrieve Button Label or the specific attribute defined under Application Options.
If several tool descriptors of the retrieve action return file descriptors then the last descriptor is used by AWM.
The context of the retrieve action contains all the properties from the main context plus all values from the current dialog. You can use the dialog fields as input parameters for the retrieve action, as illustrated in the following figure:
Additionally, you can return labels for the retrieved values. The selection list in the dialog will then display only the labels, while selecting an item will put the value into the input field.
You cannot use a property of the type Text Array to support the Retrieve Values action.
If the retrieve action returns just one value, then the value is directly filled in the editable field and the selection list is not used. The retrieve action can be used for dialog fields where the user should enter a file or folder.
In a Retrieve Values action, you can use the Select Resource tool from the Eclipse function package or the Select Local OS Resource tool from the OS function package to open a standard dialog for a file/folder selection. The selected file/folder is directly placed into the dialog input field.
There are two different ways you can model a Retrieve Values action depending on the Values From attribute in the Retrieve All Values category of a property:
AWM uses a specified search hierarchy to find values and labels:
To support labels in the box, simply return two values for each line of the structured file descriptor. AWM interprets the first value of each line as the value and the second as the label. Additional values returned in the file descriptor are ignored.