Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Item Search with complex formula based on transactions.
I have a saved ITEM search with the following formula:
Formula(Numeric):
(CASE WHEN SUM(CASE WHEN ({transaction.type} = 'Order Reservation') THEN (CASE WHEN ({transaction.type} = 'Order Reservation' AND {transaction.status} = 'Approved' AND {transaction.saleschannel} = 'DTC') THEN ({transaction.quantitycommitted}-{transaction.quantitydemandallocated}) ELSE 0 END)ELSE 0 END)+ MAX(NVL({locationquantityavailable},0)) +MAX(0) <0 THEN 0 ELSE (SUM(CASE WHEN ({transaction.type} = 'Order Reservation') THEN (CASE WHEN ({transaction.type} = 'Order Reservation' AND {transaction.status} = 'Approved' AND {transaction.saleschannel} = 'DTC') THEN ({transaction.quantitycommitted}-{transaction.quantitydemandallocated}) ELSE 0 END)ELSE 0 END)+ MAX(NVL({locationquantityavailable},0)) +MAX(0)) END)-{custitemdtcavailqty}
Summary type = Maximum
This returns the correct values, so the formula is OK. However, I really only want to see values if they are not equal to zero. When I put this formula in as criteria instead of a result, netsuite gives an error: "