Running Searches in Config: Basic Syntax
Documentation article about Basic Syntax This section covers the syntax and patterns for defining and resolving searches within config.
This section covers the syntax and patterns for defining and resolving searches within config.
Important:
Config searches are limited to a maximum of 1,000 return values or records. Be sure to manage your search criteria so you don't reach this limit and cause errors. For more information, see Search Result Limits.
Basic Syntax
To understand the syntax of a simple search, we'll use the sample below:
1{2 "record": "supportcase",3 "filters": ["internalid","anyof","${event.supportcase || 0}"],4 "map": {5 "id": "internalid",6 "label": "casenumber"7 }8}The record property sets the search type to run or the record type to search for. In the sample above, we're searching for Case records. You can find the ID of the record or search type using the NetSuite record browser. For more information see, Working with the SuiteScript Records Browser.
The filters property sets the search criteria.
The map property sets what results will be returned. In this example, you'll get back an object with two properties: id and label.
Special Characters in map
You can use special characters in the map section to change how the search results work. Here are some of those characters:
Note:
When you use special characters, remember that they work the same way they do in NetSuite. For example, using group means all other fields you want to return results need to be grouped, counted, or summed. If you use these, it is best practice to have all results grouped or summarized.
Character
Usage
=
Get value
Get text value (label)
[ ]
Get array values (multiselect)
*
Merge search result duplicates of this column value
<
Sort in ascending order
>
Sort in descending order
^
Group by maximum value
?
Count
Sum
~
Average
{
Minimum
}
Maximum
!
Write a value even if it hasn't changed
Get value and Get text
The equals (=) character lets you get a field's value. For example, if you're mapping a select field, this returns the internalid of the selection. Most of the time, the value is returned by default, but the = character makes it more specific.
The number sign (#) character lets you get the field's text instead. With a select field, this returns the label of the selection as you see it in the NetSuite UI.
Multiselect or arrays
The square bracket ([ ]) characters return the result as an array. They are usually used to ensure that the selected options are returned as an array, rather than as a comma-separated list.
Pipe
The pipe (|) character lets you control where the property reads from and where it writes to, separately. It is handy when you need to read from one field but write to another, or when the same field has two different IDs for searching and writing. Another common use for the pipe character is to make sure you can read a field value but not write to it.
Here's an example search that reads from one field and writes to another:
"quantity": "quantity|item.quantity"Here's an example search that only reads the field value:
"status": "status#|"Nested Searches
You can use results from one search in the filters of another search. The nested search runs first and returns an array of internal IDs, then the outer search uses those IDs in its filter.
Important:
If you nest searches the wrong way, it can cause performance issues.
Special Nested Search Properties
The all and default properties are a couple of special search options you'll use often. By default, config searches return up to 1000 results. If you set all: true, you can get more than 1000, but it might slow things down. If there are no results results, config returns an empty array, which might cause errors. The default property gives you a fallback value instead.
The example below shows a second search inside another. The second search is on the record customrecord_nxc_cr and returns a map of custrecord_nxc_cr_asset. This field stores the asset and therefore returns the internal ID of the asset found on the record. It uses a default of 0 to avoid issues if there are no results found in the nested search. Any results found are an array of assets internal IDs, and get excluded from the main search because the nested search is inside of this filter: ["internalid","noneof",
1"record": "customrecord_nx_asset",2 "filters": [3 ["internalid","anyof","${event.caseassets}"],"and",4 ["internalid","noneof",{5 "array": true,6 "default": "0",7 "assets": {8 "record": "customrecord_nxc_cr",9 "filters": [Frequently Asked Questions (4)
What are the prerequisites for using SuiteScript to perform searches on NetSuite records?
Can I modify all record fields via SuiteScript?
How does the 'map' property work in a SuiteScript search object?
What should I be cautious of when referencing record IDs in SuiteScript?
Weekly Update History (1)
Updated the Nested Searches topic to include an example.
View Oracle DocsWas this article helpful?
More in Field Service Management
- Field Service Management Enhancements and Bug Fixes for 2026
Updated for 2026.1 with enhancements and bug fixes in Field Service Management. Field Service Management SuiteApp continues to evolve with updates in 2026.1,
- Field Service Management Enhancements in NetSuite
Discover recent enhancements to Field Service Management in NetSuite, including improved scheduling and real-time data access.
- Task List and Barcode Scanning Enhancements in Field Service
Field Service Management improves mobile app with task list search enhancements, barcode scanning, and loading indicators.
- Internationalization Enhancements in NetSuite 2026.1
NetSuite 2026.1 enhances Field Service Management with user locale support, localizing date, time, and number formats based on browser settings.
Also from NetSuite 2026.1
- Custom Tool Script Enhancements in NetSuite
NetSuite 2026.1 enhances custom tool scripts with execution logs, a new management page, and binary file support. TL;DR Opening
- Unlimited Sandbox Refreshes in NetSuite 2026.1
Starting in NetSuite 2026.1, sandbox accounts can be refreshed an unlimited number of times, enhancing testing capabilities.
- Enriched Bank Data for Improved Transaction Matching in NetSuite
Updated for NetSuite 2026.1: Enriched Bank Data feature enhances transaction matching accuracy using generative AI.
- Natural Language Queries in NetSuite AI
Updated for NetSuite 2026.1, featuring enhancements in natural language queries. The MCP Standard Tools SuiteApp offers enhanced AI-driven interaction with
Advertising
Reach Field Service Management Professionals
Put your product in front of NetSuite experts who work with Field Service Management every day.
Sponsor This Category