What suitescript 2.1 N/search text filters support...
# ask-stanley-ai
d
What suitescript 2.1 N/search text filters support wildcards?
c
AI generated answer (using internal Slack threads):
In SuiteScript 2.1, the N/search module supports the use of wildcards in text filters. You can use the asterisk (*) as a wildcard character in your search filters. This can be particularly useful when you want to search for records that contain a specific pattern of characters. For example, if you want to find all records where the name field contains the word "test", you could use a filter like this:
Copy code
javascript
var filters = [];
filters.push(search.createFilter({
    name: 'name',
    operator: search.Operator.CONTAINS,
    values: '*test*'
}));
In this example, the asterisk (*) before and after "test" acts as a wildcard, meaning it will match any characters before or after "test". Please note that the use of wildcards can make your searches slower, especially if you are searching through a large number of records. Therefore, it's recommended to use them sparingly and only when necessary. ****** 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.830057859
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828007042
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826962888
Please provide your feedback on this answer.