Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow User to select "ALL" in the parameter

Status
Not open for further replies.

capronton

MIS
Jun 28, 2013
159
US
How can I give user the option to select ' ALL' in the parameter prompt? Instead of selecting multiple routes, I want the user to be able to select "ALL" routes.
Thanks for any suggestions.
 
The way I do it -

In your selection statement - if your parameter is called {?Route}:

(
if {?Route} = "ALL" then
true
else
{yourRouteField} = {?Route}
)
 
Rather than using an If-Then-Else statement in the Record Selection formula, I prefer to take the following approach which I have found is more likely to get passed into the SQL Select statement (depending on data source) and therefore improve efficiency):

Code:
(
	{?Route} = "ALL" or
	(
		{?Route} <> "ALL" and
		{yourRouteField} = {?Route}
	)
 )

Hope this helps.

Cheers
Pete

 
User still cannot see the keyword " ALL" in the dynamic prompt list menu option. Do I have to create a SQL Command query that grabs all values and the keyword " ALL"?

Or is there another way to get the keyword " ALL" to display in the dynamic prompt list menu option?
 
Yes, if using a Dynamic Parameter you will need to use a SQL Command so you can add the "All" option to the available alternatives.

Cheers
Pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top