ANS-0287 · CUSTOM FIELDS, RECORDS & FORMS
How to Access Multi-Select Field Values in NetSuite Formulas
Learn how to retrieve and evaluate internal IDs from multi-select fields using NetSuite formulas.
Short answer
NetSuite workflows can read multi-select fields, outputting a concatenated list of internal IDs using the .id suffix. While formulas like REGEXP_SUBSTR and CASE WHEN can be constructed to evaluate these IDs, caution is advised when using such formulas directly in workflow conditions, especially with multiple selected values, due to known reliability limitations.
Scenario
NetSuite users often need to evaluate the selected values within a multi-select field, for example, to check if a specific user is included in a list of approvers. Directly accessing and comparing these values within workflow conditions can present challenges, particularly when the field contains multiple selections.
Solution
Multi-select fields can be read within NetSuite, producing a concatenated output of all selected values. To retrieve the internal IDs of these values, append .id to the multi-select field's ID. For instance, if the multi-select field ID is custbody_gs_approvers, its internal IDs can be accessed as {custbody_gs_approvers.id}.Formulas leveraging REGEXP_SUBSTR and CASE WHEN can be constructed to evaluate these concatenated internal IDs. An example formula to check if the current user's ID is present in a multi-select approvers field is:
CASE WHEN REGEXP_SUBSTR({custbody_gs_approvers.id} ,{user.id}) = {user.id} THEN 1 ELSE 0 END = 1This formula can incorporate workflow fields or joined fields as needed.Important Consideration for Workflow Conditions:While the underlying formula logic is valid for evaluating internal IDs, it is important to note a known limitation: workflow conditions may silently fail when evaluating multi-select fields that contain more than one selected value. Therefore, while the formula demonstrates how to read and evaluate multi-select field IDs, its direct application within workflow conditions for fields with multiple selections should be approached with caution and thorough testing.
Expert NetSuite Support
Need help with this NetSuite issue?
Custom Fields, Records & Forms consulting and configuration support
