Hi Guys,
Can you please help getting malformed statement error.
Want to say if the item is flagged in a prior formula in the WF as a KBB_Item do a if / then statement I wrote it as below. But getting an error can someone please help?
IF [KBB_Item]= 'KBB_Item' THEN [KBB_Loop_Qty]-([CBL_Total_Dmd]+ [WO Required Quantity])<='0'
then 'Review_KBB_Loop' ELSE "OK"
ENDIF
Solved! Go to Solution.
Hi @Karl_Spratt can you remove the quotation marks around the 0 in your IF Statement. You only need quotation marks if its text and not a numeric value.
Hey @Karl_Spratt
It looks like you're trying to do a nested if statement? If so, it seems as though you forgot your second "if" so something like
IF [KBB_Item]= 'KBB_Item' THEN IF [KBB_Loop_Qty]-([CBL_Total_Dmd]+ [WO Required Quantity])<='0'
then 'Review_KBB_Loop' ELSE "OK" ENDIF ELSE ...
ENDIF
Hi @Karl_Spratt
Try this:
IF [KBB_Item] = 'KBB_Item' AND [KBB_Loop_Qty]-([CBL_Total_Dmd]+[WO Required Quantity])<=0 THEN 'Review_KBB_Loop' ELSE "OK" ENDIF
Since you are using two logic statements, you need to add an "AND" command between them instead of the "THEN" command you initially used.
If this solves your issue please mark the answer as correct, if not let me know!
Thanks!
Phil
Hi, @Karl_Spratt
1. If you have sequential conditions to consider, you might use ELSEIF
IF [KBB_Item]= 'KBB_Item' THEN [KBB_Loop_Qty]-([CBL_Total_Dmd]+ [WO Required Quantity])<='0'
ELSEIF (whatever the second sequence of conditions)
then 'Review_KBB_Loop' ELSE "OK"
ENDIF
2. If you have concurrent conditions to consider, you might want to use AND
IF [KBB_Item]= 'KBB_Item' THEN AND [KBB_Loop_Qty]-([CBL_Total_Dmd]+ [WO Required Quantity])<='0'
then 'Review_KBB_Loop' ELSE "OK"
ENDIF
3. If you prefer to use nested arguments, you might try IIF arguments instead of IF --> ELSEIF
Cheers!
Thank you that worked.
Hi Guys,
How can I amend this formula to say. if the KBB_Item Column doesn't have the KBB_Item value ( It's blank / not populated in import file), make these items in the formula as "Non_KBB_Items", otherwise run this formula on the column.
IF [KBB_Item] = 'KBB_Item' AND [KBB_Loop_Qty]-([CBL_Total_Dmd]+ [WO Required Quantity])<=0
THEN "Review_KBB_Loop" ELSE "OK"
ENDIF
TIA.
Karl
Hey @Karl_Spratt
You'd just need to add another logic statement at the beginning.
IF IsEmpty([KBB_Item])
THEN 'Non_KBB_Item'
ELSEIF [KBB_Item] = 'KBB_Item' AND [KBB_Loop_Qty]-([CBL_Total_Dmd]+[WO Required Quantity])<=0
THEN 'Review_KBB_Loop'
ELSE "OK"
ENDIF
If this solves your issue please mark the answer as correct, if not let me know!
Thanks!
Phil
Thanks Phil that worked.
Cheers Karl.