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!

Multiple parameters (range and discrete) in the select expert

Status
Not open for further replies.

Meredith

Technical User
Mar 8, 2002
17
US
I am using two parameters in the select expert and I can't seem to get them working properly. I'm actually working with three parameters but one is not used in the select expert, it's just used for sorting.

The user first selects whether to view a list of codes sorted alphabetically either by code or description (this parameter is working properly). Next, they get to pick a range of codes or descriptions that can be alphabetic or numeric. The user types in what they want to see but they also have one default option, which is 'All'. I'm having problems getting the 'All' to work properly, whenever 'All' is selected, it comes up blank. I got it to work with some kinks earlier but for some reason it just doesn't work at all now (as far as the 'All' is concerned). The second parameter allows the user to select whether or not active, inactive or all codes should be viewed. I set up that parameter to have a picklist of default values (A, I, or All) and this parameter seems to work except I don't know how to get 'All' codes option to display (for now I have it as a default of "F" which ends up being active codes).

Anyway, this is the formula I have for now. I realize the first one can be cut short because it just repeats the same result ({?Range} = {ALLERGIES.DESCRIPTION}) but some reason it was working (to an extent) like this before whereas the shortened version is not working. I hope this makes some sense.

Code:
if {?CodeDescriptionSort} = 'D'
then if {?Range} = 'All' 
then {?Range} = {ALLERGIES.DESCRIPTION}
else {?Range} = {ALLERGIES.DESCRIPTION}
else 
if {?CodeDescriptionSort} = 'C'
then if {?Range} = 'All' 
then {?Range} = {ALLERGIES.CODE}
else {?Range} = {ALLERGIES.CODE}

and

if {?Status} = 'A'
then {ALLERGIES.DISCONTINUED} = 'F'
else if {?Status} = 'I'
then {ALLERGIES.DISCONTINUED} = 'T'
else if {?Status} = 'All'
then {ALLERGIES.DISCONTINUED} = 'F'

Any help is appreciate, I really hope this understandable. Thanks!
 
What about:
if {?CodeDescriptionSort} = 'D' and {?Range} = 'All'
then {?Range} = {ALLERGIES.DESCRIPTION}
else
if {?CodeDescriptionSort} = 'C' and {?Range} = 'All'
then {?Range} = {ALLERGIES.CODE}
else {?Range} = {ALLERGIES.CODE} Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
Unfortunately it's still appearing blank when 'All' is selected. It's very odd to me that it's doing this all of sudden whereas before I wasn't having any problems with the 'All' and I don't think I changed anything significant. Thanks very much for looking into it though.
 
Use double quotes instead of single quotes around any text in these types of formulas. Don't ask me why, but I have had mixed results using single quotes. Others on this board (IdoMillet if I recall) have had the same problem. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Unfortunately the double quotes didn't seem to do the trick. I read the kbase article and changed my parameter based upon that and the 'All' works now. I did this by removing 'All' as a default choice and now the user just leaves the range blank. However, upon doing this, if the first range is left blank (the lower bound) then all records are shown. It should just show records up until a certain point, like if the user had left the first range blank but then typed 'M' for the second (the upper bound), it should be all records up to 'M', not all records. It does work correctly when the upper bound is left blank and the lower bound is filled (which seems sort of odd to me). Thanks again for taking time to look at the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top