Formulas in NetSuite saved search are highly valuable as they enable users to create complex custom search criteria that are impossible to achieve with standard search fields. By using search formulas, you can manipulate the data in real-time and dynamically filter specific conditions and calculations. Instead of reviewing large amounts of data, save time and increase efficiency by automating search processes by quickly narrowing results.
NetSuite search formulas can be used to:
• Combine multiple search fields into one
• Apply calculations to search fields
• Utilize conditional logic to include or exclude results based on specific conditions
• Create ranges based on dates and date fields in NetSuite
Formulas in search
Define formulas for Advanced searches and Saved searches to be used in the following ways:
Updates to Formula Text Fields
| Variable | Synonym | Details |
| {today} | {now} | Returns current date based on users time formatting, date and time zone. |
| {me} | {user}, {user.id} | Returns current user ID. |
| {userrole} | {userrole.id} | Returns current role ID. |
| {user.department} | {userdepartment.id} | Returns current user’s department ID. |
| {user.location} | {userlocation.id} | Returns current user’s location ID. |
| {user.subsidiary} | {usersubsidiary.id} | Returns current user’s subsidiary ID. |
| {user.class} | {userclass.id} | Returns current user’s class ID |
| {usercurrency} | {usercurrency.id} | Returns current user’s currency. |
If a custom formula field is returning fixed values instead of updating it with new data entered into the system, it could be because the field was configured to store the calculated value at the time the record was created. The "Store Value" checkbox in the custom field definition controls this behavior. To determine whether the value should be recalculated dynamically with each search, consult your system administrator.

1. On an Advanced or Saved search page, go to the Criteria subtab. Click on the Filter column and choose a Formula type.
Formula (Date)
Formula (Numeric)
Formula (Text)
The optimal formula format hinges on the intended calculation, as the method of verification differs based on the type of formula. For instance, expressions should be in formula (Text) vs numeric calculations being Formula (Numeric).
2. Define your formula in the Formula popup window, define your formula, and click Done.
Filter date formulas by specifying whether the date occurs before or after a certain date. Filter numeric formulas by checking if the resulting value is greater than or equal to the given criteria. There is a 1000-character limit per formula which will result in an invalid expression.
Search records are dynamically filtered based on the calculated value of the formula when the search is conducted. If you are looking for top-rated customer service and on-demand NetSuite help, Protelo can help. Protelo differentiators include direct access to their expert NetSuite consulting team, a fast-responding LiveChat for information, interactive NetSuite User Group, and a team that is fully focused on our client’s business success.
3. Click Submit to view your search results.
To avoid any HTML output from being rendered in Formula (Text) fields, you can check the Disable HTML in Search Formula (Text) box at Setup > Company > Preferences > General Preferences (Administrator). Check the Disable HTML in Search Formula (Text) box and click save.
How to Define, Customize, and Access a Saved Search
To use a formula in a NetSuite saved search result, you can follow these steps:
After completing these steps, your saved search will include a new column displaying the results of the formula calculation. When you run the saved search, the results will include the values of the existing search fields and the newly calculated field referring to the formula you entered.
The following formula types are available in NetSuite:
|
Formula Type |
Example |
|
Formula(Currency) |
TO_NUMBER({amount}) |
|
Formula(Date) |
TO_DATE('11/16/2020','MM/DD/YYYY') |
|
Formula(Date/Time) |
{now} |
|
Formula(Numeric) |
{field_id} |
|
Formula(Percent) |
% of total 30/100 |
|
Formula(Text) |
TO_CHAR({metataghtml}) |
|
Formula(HTML) |
TO_CHAR({metataghtml})
|
RELATED CONTENT:
• NetSuite Saved Searches: A How-to Guide
• NetSuite How-To: Dynamic Fields on Saved Searches
• NetSuite Search Formulas & Methods Overview
Your NetSuite search will now have a new formula field that merges the values of multiple search fields into a single one. When you run the search, the results will include records that match the merged field value based on your other search criteria and filters.
Tags function as virtual fields that don't affect search but personalize the results according to the user's preferences and situation. Unlike formulas, tags retrieve outcomes based on the search user's context.
To add a formula tag in search results:
|
Tag |
Description |
|
TODAY or NOW |
Current time in the appropriate time zone of the logged user. |
|
ME or USER or USER.ID |
An internal key (ID) of the logged user. |
|
USERROLE or USERROLE.ID |
An internal key (ID) of the role of the logged user. |
|
USER.DEPARTMENT or USERDEPARTMENT.ID |
An internal key (ID) of the department of the logged user. |
|
USER.LOCATION or USERLOCATION.ID |
An internal key (ID) of the physical location of the logged user. |
|
USER.SUBSIDIARY or USERSUBSIDIARY.ID |
An internal key (ID) of the subsidiary of the logged user. |
|
USER.CLASS or USERCLASS.ID |
An internal key (ID) of the class of the logged user. |
|
USER.CURRENCY or USERCURRENCY |
A base currency for the subsidiary of the logged user. |
• Analytic and Aggregate Functions
• Numeric Functions
• Character Functions Returning Character Values
• Character Functions Returning Number Values
• Datetime Functions
• Case
• Sysdate
• NULL-Related Functions
• Decode
Formula (Text) fields that contain HTML code will only display results as plain text to enhance saved search security. Formula (HTML) fields can only be used as results fields to users with the appropriate permissions. If you would like to enable specific users to have access, go to the permissions tab and enable the Role in the Setup subtab.

Protelo's certified NetSuite professionals are here to help you get the most out of NetSuite! Our team can provide expert guidance and support on-demand without support tickets or annual contracts. For more information on our NetSuite expert services or a customized NetSuite quote, contact our team today!
With decades of business-process expertise and extensive product knowledge under our belt, our consultants provide a single source of expertise to implement, customize, integrate, and refine your back-end operations.
Get NetSuite Services Today Contact Protelo
YouTube, LinkedIn, X, Pinterest, Instagram, and Facebook
