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

if then formula just not right 1

Status
Not open for further replies.

brecat77

IS-IT--Management
Feb 27, 2008
28
US
IF ISNULL ({INVENTRY.IssueUnitOfMeasure}) THEN {TRANS.quantity}

ELSE {TRANS.quantity}*.3048

my problem is this, i only need {TRANS.quantity} to multiply by .3048 if the ({INVENTRY.IssueUnitOfMeasure}) is = MT otherwise i need it to just be {TRANS.quantity}.

Any help here would be greatly appreciated.
 


IF ISNULL ({INVENTRY.IssueUnitOfMeasure}) THEN {TRANS.quantity}
ELSE IF {INVENTRY.IssueUnitOfMeasure}) = "MT" THEN {TRANS.quantity}*.3048
ELSE {TRANS.quantity}
 
Hello,

if not isnull({INVENTRY.IssueUnitOfMeasure}) then
if {INVENTRY.IssueUnitOfMeasure} = 'MT' then
{TRANS.quantity}*.3048
else
{TRANS.quantity}
else
{TRANS.quantity}

Dana
 
that works great except that if i put anything into the field of ({INVENTRY.IssueUnitOfMeasure}) it multiplies it by .3048. such as MT is in there for about 6 items, the rest are blank, this is fine, but if i put in anything into the field of ({INVENTRY.IssueUnitOfMeasure}) it multiplies it by .3048
 

IF {INVENTRY.IssueUnitOfMeasure}) = "MT" THEN {TRANS.quantity}*.3048

else THEN {TRANS.quantity}
 
OK, maybe {INVENTRY.IssueUnitOfMeasure} is not null, just empty; update as follows:

if not isnull({INVENTRY.IssueUnitOfMeasure}) and trim({INVENTRY.IssueUnitOfMeasure}) <> '' then
if {INVENTRY.IssueUnitOfMeasure} = 'MT' then
{TRANS.quantity}*.3048
else
{TRANS.quantity}
else
{TRANS.quantity}

Dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top