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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select ANY value from Number Parameter

Status
Not open for further replies.

jannoth

MIS
Oct 9, 2007
60
CA
re: CR v 7

At runtime, we let users choose from several default parameter values. To speed up processing, we allow them to choose "Any" by creating a default value of "*" (asterisk) then modifying the selection formula to say "FieldName LIKE ParameterName".

That works great for string fields and parameters but is there a way of doing that for numeric fields?

Any clues would be gratefully received.

J :eek:)
 
I usually make it a string field anyway and then convert it to the other format.

Then I make the default "Any".

Then for things like numerics I test 'IsNumeric' and then if it isn't treat it like they put in 'Any'. Same with dates.

If I happen to be using this in my record selection then that is where I check.

Code:
(If isnumeric(param1)
then field=param1
else 1=1)

and 
(if isdate(param2)
then field>=param2
else 1=1)

Works pretty good for me.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top