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

Nested IF - issue with multiples......

Status
Not open for further replies.
Joined
Apr 11, 2008
Messages
68
Location
GB
Hi All

I'm no stranger to nested IF commands, but am having trouble with one that I need to test multiple values.

The current simple command is below, and works fine.

if {prodmast.pm_ptyp} = "10" then
if {peranal.pa_prod_cd} like "GMAN*" then (tonumber("0"))
else
tonumber({peranal.pa_sell_pr})

However, I need to add in a section that as well as identifying if {prodmast.pm_ptyp} = "10", it also identifies where {prodmast.pm_ptyp} = "11", {prodmast.pm_ptyp} = "13" etc and then applies the same later part of the command.

Any ideas?

Many thanks
 
Try this formula below I think it will give you what you need.

if {prodmast.pm_ptyp} in ["10","11","13"] then
if {peranal.pa_prod_cd} like "GMAN*" then (tonumber("0"))
else
tonumber({peranal.pa_sell_pr})

You can add as many values as you need to evaluate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top