expression is not an available selection for 'filt...
# ask-stanley-ai
n
expression is not an available selection for 'filter using'. how can i create a custom field of list/record for vendor that is filtered to only show vendors whose name starts with 'oci'?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you are trying to create a custom field of list/record for vendors that is filtered to only show vendors whose name starts with 'oci'. However, you are unable to do so because the 'expression' is not an available selection for 'filter using'. Unfortunately, NetSuite does not provide a direct way to filter list/record fields in the UI based on a specific condition like 'starts with'. The available filters for list/record fields are limited to the standard options provided by NetSuite. However, you can achieve this by creating a custom SuiteScript. You can create a Suitelet or a User Event script that filters the vendor list based on your condition and then populates the custom field. Here is a basic example of how you can do this:
Copy code
javascript
var vendorSearch = search.create({
   type: search.Type.VENDOR,
   filters: [
      search.createFilter({
         name: 'name',
         operator: search.Operator.STARTSWITH,
         values: 'oci'
      })
   ],
   columns: ['internalid', 'name']
});

vendorSearch.run().each(function(result) {
   // Populate the custom field with the result
   // You can use record.setValue or similar method to set the value of the custom field
   return true;
});
This script creates a search on the Vendor record type and filters the vendors whose name starts with 'oci'. You can then use the results of this search to populate your custom field. Please note that this is a basic example and you might need to adjust it according to your specific requirements and NetSuite environment. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827593148
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826592386
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8204391
Please provide your feedback on this answer.