Saved search text formula, if {name} ends with IR ...
# ask-stanley-ai
l
Saved search text formula, if {name} ends with IR then ‘Item Receipt’, else ‘None’
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** Based on the conversations, it seems you are looking for a way to create a formula in a saved search that will return 'Item Receipt' if the {name} ends with 'IR', otherwise it will return 'None'. Unfortunately, the conversations provided do not contain a direct solution or code sample for this specific requirement. However, you can use the
CASE
or
IF
statement in SQL to achieve this. Here's a general example:
Copy code
sql
CASE 
    WHEN RIGHT({name}, 2) = 'IR' THEN 'Item Receipt'
    ELSE 'None'
END
Please replace
{name}
with the actual field name in your saved search. This formula checks if the last two characters of the {name} field are 'IR'. If true, it returns 'Item Receipt'. Otherwise, it returns 'None'. Please note that this is a general SQL formula and might need adjustments based on the actual field name and requirements in NetSuite.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827880859
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815734863
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.809692383
Please provide your feedback on this answer.