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