Search Formula Examples and Tips

Review the following items for hints about how other users have defined search formulas.

For other search examples, see Saved Search Examples.

For details about supported SQL functions, see SQL Expressions. For tables of NetSuite field IDs you can refer to SuiteScript Supported Records.


If you have examples or tips that you think other users may find helpful, please submit them to the NetSuite User Group's 100 Ways to Use Formula Fields thread.


Field values referenced in formula definitions may be translated based on a user’s language preference. For example, if a formula is created for a saved search using an English field value and the search is run by a user with a different language setting, the results of the search may vary. Consequently, you should be using internal field IDs when constructing formula definitions. This will ensure the intended results are displayed, regardless of a user’s language settings.

Including Line Numbers in Transaction Searches

Referencing Field IDs

Avoiding Divide By Zero Errors

Using Joined Search Field Values

Retrieving the Day of the Week for a Date on a Custom Record

Displaying the Percentage Variance between Custom Record Values

Calculating Days Remaining Until Task Complete

Displaying Multiplier from Cost to Base Price for Items

Comparing Summed Amounts Across Two Fiscal Years for Transactions

Finding the Most Recent Record Updater

Calculating Days a Sale Is In Effect

Referencing System Notes Records

Calculating Time Taken to Approve Orders

Related Topics

Formulas in Search
Using a Custom Formula Field in a Search
Using a Formula in Search Criteria
Using a Formula in Search Results
Using Formula Tags in Search Results
SQL Expressions

General Notices