Can someone please help with the logic to get rid of the error : MALFORMED IF STATEMENT
if contains(uppercase([Parent Product]),"x") then 1
elseif contains(uppercase([Parent Product]),"y") then 2
elseif contains(uppercase([Parent Product]),"z") then 3
elseif contains(uppercase([Parent Product]),"a") then 4
elseif contains(uppercase([Parent Product]),"b") then
if contains([Child Product],"Sample") then 5 else 6
endif
Solved! Go to Solution.
Hi @SiddhantSurve ,
The challenge here is that you're opening up a new IF without closing it, or your last if should be an ELSEIF
To wit:
if contains(uppercase([Parent Product]),"x") then 1
elseif contains(uppercase([Parent Product]),"y") then 2
elseif contains(uppercase([Parent Product]),"z") then 3
elseif contains(uppercase([Parent Product]),"a") then 4
elseif contains(uppercase([Parent Product]),"b") then
ELSEIF contains([Child Product],"Sample") then 5
else 6
endif
OR:
if contains(uppercase([Parent Product]),"x") then 1
elseif contains(uppercase([Parent Product]),"y") then 2
elseif contains(uppercase([Parent Product]),"z") then 3
elseif contains(uppercase([Parent Product]),"a") then 4
elseif contains(uppercase([Parent Product]),"b") then
IF contains([Child Product],"Sample") then 5 else 6
ENDIF
ELSE 6
endif
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |