Contact
Page header background

Home >> How To: Netsuite Case When Formula with Multiple Conditions

At BestCRMSoftware.com, we prioritize transparency and honesty in all our content. In order to maintain the quality of our reviews and to keep providing valuable information to our audience at no cost, We earn commissions through clicks and affiliate purchases from select links in our articles. Our commitment to unbiased content remains unwavering, despite our use of affiliate links. These links do not influence the opinions or recommendations provided by our editorial team. We prioritize integrity and objectivity in every piece of content we produce, ensuring that our readers receive unbiased and reliable information to inform their decisions effectively.

How To: Netsuite Case When Formula with Multiple Conditions

David Lee - Data-Driven CRM Strategist
Author
David Lee
CRM Strategist and Speaker
David Lee - Data-Driven CRM Strategist
Biography
David Lee brings over 3 years of CRM experience to the table, with a proven track record of success in helping businesses leverage technology to achieve their customer relationship goals. He is a data-driven CRM strategist with a keen understanding of how to utilize CRM systems to gain actionable customer insights and personalize customer interactions. David is a regular contributor to industry publications and frequently speaks at CRM conferences, sharing his knowledge and best practices with the CRM community. He holds a Master's degree in Business Administration (MBA) with a specialization in Marketing.
View Author Profile
Anna Rodriguez BestCRMSoftware Author
Factcheck By:
Anna Rodriguez
CRM Expert
Anna Rodriguez BestCRMSoftware Author
Biography
Anna Rodriguez is a CRM consultant with 4 years of experience in helping businesses across various industries select, implement, and manage their CRM systems. She is skilled in CRM system customization, data migration, and user adoption strategies. Anna is passionate about helping businesses unlock the full potential of their CRM systems and fostering a customer-centric culture within organizations. She constantly keeps on top of the newest industry trends and holds a Bachelor's degree in Information Technology.
View Author Profile
Latest Update: Aug 22, 2024, 9:02 am
Netsuite case when multiple conditions
Latest Update: Aug 22, 2024, 9:02 am
Editorial Note: We might earn a commission from partner links on BestCRMSoftware.com. These commissions do not affect our writers and editors’ opinions or evaluations.

Quick introduction:

NetSuite Saved Searches and formula fields are often the lifeline for Netsuite users. Using Formula fields in Oracle SQL functions allows users to enhance search results quickly and easily. 

One of the most helpful and commonly used SQL functions is the CASE when function. When using SQL expressions in NetSuite, the CASE function allows users to start making conditional statements.

This is rather similar to the =IF function in Microsoft Excel. When combined with ‘WHEN’, ‘THEN’, ‘ELSE’, and ‘END’, it allows users to make functional conditional formulas. Taking it a step further, there may be scenarios when you need to use multiple Case conditions in NetSuite.

While it can be a bit tricky to debug or look for syntax errors in formulas with multiple conditions, there is a simple solution. In this step-by-step guide, we will learn how to create a NetSuite case with multiple Cases when statements are in criteria.

Step-by-Step Process To Use Multiple CASE Conditions in NetSuite

There are various scenarios when users will need to use multiple conditions in a formula to boost efficiency, streamline processes, or even simplify complex formulas.

For instance, consider the formula below:

CASE WHEN [criteria] THEN [result] ELSE [alternative result] END

This expression allows the user to test multiple scenarios before concluding with the ‘ELSE’ outcome.

Let us use an example to put this formula into action. For instance, we want to show the sum-up amount for when the ship date is between two different dates and the status is “Pending Fulfillment.”

Here are the steps to combine the two case-when statements in NetSuite:

Step 1: Access Saved Searches in NetSuite

  • Navigate to Reports and scroll down to “Saved Searches” in the dropdown menu.
  • Select “All Saved Searches,” then click “New.”
netsuite saved searches menu items
  • Scroll down the list and click “Transaction.”

Step 2: Modify The Saved Search And Add The Criteria

A new window will appear where you can modify the Saved Search.

  • Modify the Search Title
  • Add the filters to the formula. First, click on the first Filter field, scroll down the list, and click Type.
  • Keep the Type “any of” and type “Sales Order” in the field. Then, click “Set.”
netsuite saved transaction search screenshot
  • Similarly, click on the first Filter field, scroll down the list, and click Main Line.
  • Select the “Yes” option, then click “Set.”
netsuite saved transaction search screenshot 2
  • Next, select “Formula (Numeric)”
  • Under Formula, add the formula provided. Adjust the specific criteria. In this use case, add the dates.
  • Under Formula Numeric, select “Not equal to.”
  • Under Value, type in 0. 
  • Then, click “Set.”
netsuite saved search formula screenshot
  • Under the “Results” tab, navigate to the “Column” section and add or remove fields according to your preference. 
netsuite transactions column field
  • For this case, add “Status” and “Shipped Date” to verify the results of the formula.
  • When you are done, click “Save and Run”.
netsuite saved search save and run screenshot

Step 3: Verify The Results

  • The results of the saved search will appear. You can review and verify the results for accuracy by checking the dates of the transactions and the Ship Date columns. You can also check the status of the Sales Orders that are “Pending Fulfillment.”
  • Your formula worked! 
netsuite case when search screen

Wrapping Up

Case When statements are a great way to streamline processes and run otherwise complex formulas to yield simpler results. Remember, always refer to the basic Case when formula and use that to build in more complex criteria.

By following the steps outlined, you can quickly and easily create Saved Searches in NetSuite for complex formulas and criteria. Once you master the basics, you can boost your efficiency, streamline processes, and leverage the many advantages of NetSuite.