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

If statement with or - 2

Status
Not open for further replies.

themich

Technical User
Jul 15, 2011
9
US
I'm in a fog and can't figure out how to pull amounts from a table where the id field = dues or uvac. My books arrive tonight, but I thought I'd try.

IF {CURRENT_PRT_CHECK_DEDUCT.Deduction_ID}="UVAC" OR "DUES"
THEN {CURRENT_PRT_CHECK_DEDUCT.Amount}
ELSE 0
 
IF {CURRENT_PRT_CHECK_DEDUCT.Deduction_ID}="UVAC" OR {CURRENT_PRT_CHECK_DEDUCT.Deduction_ID}= "DUES"
THEN {CURRENT_PRT_CHECK_DEDUCT.Amount}
ELSE 0
 
Another Option (a little cleaner when more than one OR):

Code:
IF {CURRENT_PRT_CHECK_DEDUCT.Deduction_ID} in ["UVAC","DUES"] THEN {CURRENT_PRT_CHECK_DEDUCT.Amount} ELSE 0

Cheers! [smile]

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top