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

Help with formula for multiple fields 1

Status
Not open for further replies.

jeffm777

IS-IT--Management
Nov 10, 2009
108
US
I'm having issues with this formula. It's showing left and right correctly but all are showing front. He's some examples of the data in the two fields...

{Inventory.Side}
LH
RH

{Inventory.Description}
LH, FRONT
RH, REAR

{Inventory.Type}
FRONT
REAR

if {Inventory.Side} = "LH" or {Inventory.Description} like "*LH*" and {Inventory.Type} = "FRONT" then "Left Front" else
if {Inventory.Side} = "LH" or {Inventory.Description} like "*LH*" and {Inventory.Type} = "REAR" then "Left Rear" else
if {Inventory.Side} = "RH" or {Inventory.Description} like "*RH*" and {Inventory.Type} = "FRONT" then "Right Front" else
if {Inventory.Side} = "RH" or {Inventory.Description} like "*RH*" and {Inventory.Type} = "REAR" then "Right Rear" else
if {Inventory.Side} = "LH" or {Inventory.Description} like "*LH*" and {Inventory.Type} = "" then "Left" else
if {Inventory.Side} = "RH" or {Inventory.Description} like "*RH*" and {Inventory.Type} = "" then "Right" else
if {Inventory.Type} = "FRONT" and {Inventory.Side} = "" then "Front" else
if {Inventory.Type} = "REAR" and {Inventory.Side} = "" then "Rear
 
YOu have to make your OR explicit with ()

Either


if ({Inventory.Side} = "LH" or {Inventory.Description} like "*LH*") and {Inventory.Type} = "FRONT" then "Left Front" else

or


if {Inventory.Side} = "LH" or ({Inventory.Description} like "*LH*" and {Inventory.Type} = "FRONT") then "Left Front" else


I suspect it should be the former.

Ian
 
Thanks Ian. It was...

if ({Inventory.Side} = "LH" or {Inventory.Description} like "*LH*") and {Inventory.Type} = "FRONT" then "Left Front" else

Man I love this site!!!!! Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top