Search code examples
formulanetsuite

How do you count the number of lists/records selected on a multiselect field in NetSuite?


I have a couple multiselect fields in NetSuite where you can pick from a list of customers.

I would like to run a saved search that counts the number of customers selected on the multiselect field.

If I use count in a summary search it says 1 even if there's more than one selected (because it's the same record)

Any ideas how to go about this?

I see some case when examples for counting, but they don't seem to apply to multiselect fields.

Thanks


Solution

  • The saved search interface should provide you with a drill down for fields in record. These selections are consolidated at the 'bottom' of the field list and are suffixed with 'Fields...'

    On the Results tab of the search definition, select a new line and under the 'Field' column, click into the dropdown and find the line that matches your custom multiselect field with the suffix 'Fields...' So if your custom field is 'My Customer List', look for 'My Customer List Fields...'

    This will open a new popup, with a new field list derived from the backing record type(in this case 'customer'). You probably want to just use 'internal id' since it's guaranteed to be unique.

    Your 'Field' will now say something like: My Customer List:Internal ID

    Now your summary type of 'Count' will accurately tally the unique customers.