Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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!
