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!

if statement in a record selection Formula? 1

Status
Not open for further replies.

willz99ta

IS-IT--Management
Sep 15, 2004
132
US
Hi and thanks,

I have a multiple line selection formula and I need to have an if statement in it if possible.

When I try:
{APINVOICE.REC_STATUS} = 9 and //<-- this works fine
if {APINVOICE.HAND_CODE} = "PO" then {APINVOICE.MATCH_FL} = "Y"

it will only pull data where ({APINVOICE.HAND_CODE} = "PO") when I don't want only that information.

Any ideas?

Thanks,
Will
 
You just need to write it as a valid boolean. I suspect the formula you want is...

{APINVOICE.REC_STATUS} = 9 and
{APINVOICE.HAND_CODE} = "PO" and
{APINVOICE.MATCH_FL} = "Y"

Just need to decide what the criteria is if {APINVOICE.HAND_CODE} <> "PO"

You have three fields involved. What values are included in the report, and what is excluded.

Editor and Publisher of Crystal Clear
 
Can I write a separate query in the same report for {APINVOICE.HAND_CODE} <> "PO"?
 
I think you should set it up like this:

{APINVOICE.REC_STATUS} = 9 and
(
(
{APINVOICE.HAND_CODE} = "PO" and
{APINVOICE.MATCH_FL} = "Y"
) or
{APINVOICE.HAND_CODE} <> "PO"
)

-LB
 
Perfect LBass. That is exactly what I was trying to do.

Wo;;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top