I keep getting an error whenever I save my item saved search with this formula. I tried both Formula Numeric and Text. Does anyone know what's wrong with this?
CASE WHEN ({transaction.type} IN ('Purchase Order,'Sales Order') AND {transaction.quantity}-{transaction.quantityshiprecv} != 0) OR {transaction.type} = 'Inventory Adjustment' THEN 1 ELSE 0 END
j
Jon Kears
05/13/2021, 4:10 AM
you don't have a closing quote on Purchase Order
Jon Kears
05/13/2021, 4:10 AM
I'd also try NVL(...) on the numbers if that doesn't work
Jon Kears
05/13/2021, 4:11 AM
might also want to try brackets so it's clear where the AND and OR come into play though that isn't the source of the error
l
Luis
05/13/2021, 4:56 AM
Thank you. That solved it. What do you mean by brackets though? Are the parentheses not good enough?
j
Jon Kears
05/13/2021, 5:51 AM
oh sorry that's what I meant. How weird I spotted the missing apostrophe but didn't spot the parentheses