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

Using an or statement and one Parameter query 1

Status
Not open for further replies.

Deano1976

Technical User
Dec 16, 2004
41
GB
CR v8.5

I want to be able to search for the same parameter in either of two fields. My current formula is:

Code:
{Support_Incident.Reservation Number Full} = {?Parameter} or 
{Support_Incident.RA Number} = {?Parameter}

This formula behaves strangely:
If I am searching for {Reservation Number Full} and this is to the left of the 'OR' then it reports the correct details. However if {Reservation Number Full} is to the right of the 'OR' statement then it reports no details. The same applies when searching for an {RA Number}.
 
Is it possible that when the {Reservation Number Full} is on the right that the {RA Number} is Null? You may want to check for null first.
 
The {RA Number} may or may not be Null when using the [?Parameter} to search for either {RA Number} or {Full Reservation Number}. The same goes for the {Full Reservation Number} being Null or not.

How do I put this into a formula that works if that is the case?
 
Maybe something like:

Code:
IsNull({Support_Incident.Reservation Number Full}) and
{Support_Incident.RA Number} = {?Parameter} 

or IsNull({Support_Incident.RA Number}) and
{Support_Incident.Reservation Number Full} = {?Parameter} 

or {Support_Incident.Reservation Number Full} = {?Parameter} 
or {Support_Incident.RA Number} = {?Parameter}

Because you have to check both for null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top