ANS-0016 · SAVED SEARCHES & FORMULAS

How to Count Records Using a Summary Type in a NetSuite Saved Search

Learn how to leverage a formula(numeric) field with a 'Max' summary type to accurately count records within a NetSuite saved search.

Short answer

To count records in a NetSuite saved search using a summary type, create a new Formula (Numeric) field. Set its Summary Type to Max. In the Formula field, input count({your field id}), replacing {your field id} with the actual ID of the field you wish to count. This configuration allows the saved search to correctly aggregate and display the count.

Scenario

Users often need to count the occurrences of specific records or items within a NetSuite saved search, especially when aggregating data. Standard summary types may not always provide the desired counting functionality for complex scenarios, requiring a custom approach to achieve accurate record counts.

Solution

To implement a counting mechanism in a NetSuite saved search using a summary type, follow these steps:

  1. Add a new Formula (Numeric) field to your saved search results.

  2. For this Formula (Numeric) field, set the Summary Type to Max.

  3. In the Formula text area, enter the following expression, replacing {your field id} with the actual internal ID of the field you intend to count: count({your field id})This configuration ensures that the saved search correctly processes and displays the count of the specified field, effectively providing a 'count' summary type functionality.

Expert NetSuite Support

Need help with this NetSuite issue?

Saved Searches & Formulas consulting and configuration support

Talk to a consultant