Hi experts,
i have created a query in B1 query generator and saved .
The purpose of the query is to calculate some values based on the group of the BP and the item code too.
I used User-defined value but i get an error anytime i change my quantity.
But if i use only one side of the query without the else if statement query it works, but if i use with the else if i get the error attached in the image file.
Please review the query below and tell me what is causing this error.
Urgent help is needed.
Regards
Justice
IF (SELECT OCRD.GroupCode FROM OCRD WHERE OCRD.CardCode = $[$4.0.0]) = '102' AND (SELECT OITM.ItemCode FROM OITM WHERE OITM.ItemCode = $[$38.1.0]) = 'TP000003'
BEGIN
SELECT $[$38.11.Number] * -0.539840
END
ELSEIF (SELECT OCRD.GroupCode FROM OCRD WHERE OCRD.CardCode = $[$4.0.0]) = '102' AND (SELECT OITM.ItemCode FROM OITM WHERE OITM.ItemCode = $[$38.1.0]) = 'TP000005'
SELECT $[$38.11.Number] * -0.886961
END