I have a search of type items, and I am using a fo...
# ask-stanley-ai
r
I have a search of type items, and I am using a formula numeric "CASE WHEN {internalid} = 2486 AND {inventorylocation} = 2 THEN 1 ELSE 0 END" , but it is giving me an error.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the error in your formula might be due to incorrect usage of quotation marks or parentheses. In NetSuite saved searches, single quotes are used for string values and parentheses are used to group conditions. Your formula should look like this:
Copy code
CASE WHEN {internalid} = 2486 AND {inventorylocation} = 2 THEN 1 ELSE 0 END
If
internalid
and
inventorylocation
are string fields, you should use single quotes around the values:
Copy code
CASE WHEN {internalid} = '2486' AND {inventorylocation} = '2' THEN 1 ELSE 0 END
Also, make sure to select "Formula (Numeric)" as the field type for this formula in your saved search. If it's a summary search, use your criteria as a Summary criteria if that applies. ****** 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.878218889
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.866659582
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.864588082
Please provide your feedback on this answer.