Is there any way to set up a prompt that will allow a user to select one value, many values, or type ‘ALL’ for all values in a list?
Yes. Below is a sample of the syntax required to allow a user to select one, many, or all values from a prompt.
(@Select(Sales Geography\Country Group) IN @Prompt('Select Country Group or
enter * for all groups','a','Sales Geography\Country Group',multi,free) ) OR
('*' in @Prompt('Select Country Group or enter * for all groups','a','Sales
Geography\Country Group',multi,free))
In the sample, the asterisk is used as the wildcard. The first part of the formula…
(@Select(Sales Geography\Country) IN @Prompt('Select Country or
enter * for all countries','a','Sales Geography\Country',multi,free) )
works when a user picks one or more values from the list. The second part…
OR
('*' in @Prompt('Select Country or enter * for all countries','a','Sales
Geography\Country',multi,free))
works when the user selects the asterisk.
If a user selects ‘USA’, the following statement results…
COUNTRY IN ‘USA’ OR ‘USA’ IN ‘*’
If the user selects the asterisk, the following statement results…
COUNTRY IN ‘’ OR '’ IN ‘*’
The IN, combined with ‘multi’ are the keys to allowing the selection of multiple values from the list.
Here is another example which demonstrates how a prompt of this type can accept multiple wildcards and handle case sensitivity…
(PER_JOBS.ATTRIBUTE3 IN @Prompt('Enter Employee Survey Code(s) ("ALL" for
all)','A','Job Information\Add. Job Details Survey Code',multi,free) OR
'ALL' IN @Prompt('Enter Employee Survey Code(s) ("ALL" for all)','A','Job
Information\Add. Job Details Survey Code',multi,free) OR
'All' IN @Prompt('Enter Employee Survey Code(s) ("ALL" for all)','A','Job
Information\Add. Job Details Survey Code',multi,free) OR
'all' IN @Prompt('Enter Employee Survey Code(s) ("ALL" for all)','A','Job
Information\Add. Job Details Survey Code',multi,free) OR
'*' IN @Prompt('Enter Employee Survey Code(s) ("ALL" for all)','A','Job
Information\Add. Job Details Survey Code',multi,free) OR
'%' IN @Prompt('Enter Employee Survey Code(s) ("ALL" for all)','A','Job
Information\Add. Job Details Survey Code',multi,free))
Cindy Clayton (BOB member since 2002-06-11)