Discussions
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. Join us
NSC | Using the GREATEST or LEAST Function to Shorten a long CASE WHEN Formula in a Saved Search
In NetSuite Saved Searches, there is a 1000 character limit per formula expression. This is documented in SuiteAnswers 8449 and 8450.
For example, you have a long complex formula similar to this logic:
CASE WHEN ([long complex formula here]) > 0 THEN ([long complex formula here]) ELSE 0 END
Using a long complex formula more than once can easily exceed this 1000 character limit.
Assuming that the long complex formula used more than once is exactly the same, then we can use the GREATEST function to simplify and use the complex formula only once.
Here's the logic:
GREATEST(0, ([long complex formula here]) )
With this, only the greater value
Learn how to Refer A Member | Earn the Answer Accepter Badge | Be the Content Creator of the Quarter | Vote for the content you want to see!
