Multiselect or arrays

Documentation article about Multiselect or arrays

·2 min read·View Oracle Docs

Multiselect or arrays

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:

json
"quantity": "quantity|item.quantity"

Here's an example search that only reads the field value:

json
"status": "status#|"

Frequently Asked Questions (4)

How do special characters in NetSuite searches affect search results?
Special characters in NetSuite searches can alter how search results are returned. For example, using square brackets [ ] can return multiselect field results as arrays, while using an asterisk * merges duplicates. Each character has a specific use, impacting grouping, sorting, or summarizing data.
When should I use square brackets in mapping NetSuite fields?
Use square brackets [ ] when you need to return results from a multiselect field as an array, rather than as a comma-separated list. This ensures that each selected option is distinctly returned as separate entries inside an array.
Can I control where a property reads from and writes to using special characters?
Yes, using the pipe (|) character, you can separately specify the source and destination for a property. It allows reading a field value from one location while writing it to another or provides a way to read without writing.
What does the number sign character (#) do in a NetSuite search?
The number sign (#) character retrieves the text value or label of a field. For instance, when used on a select field, it returns the human-readable label seen in the NetSuite user interface.
Source: Multiselect or arrays Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in General

View all General articles →