Forums › Cached › Customization › Reporting › Report Builder
This topic contains 7 replies, has 0 voices, and was last updated by vdeymos 9 years, 8 months ago.
-
AuthorPosts
-
September 20, 2013 at 2:53 pm #7798
EkosmerlHi All,
How is it possible to set criteria in a saved search to search for any record based on a list of values?
For example, we have an external list of 10 customers and we need to pull an additional piece of information from their records in NetSuite.
I thought something along the lines of:
Formula (Text)
{Name} IN (‘Name 1′,’Name 2′,’Name 3’)
However, when I enter this in, it never saves my formula description (line two of the above example) making me think I can’t use “IN” for my function.
Any ideas?
This is a cached copy. Click here to see the original post. -
September 21, 2013 at 1:56 am #7799
vdeymosYou can use the IN function on a saved search. However, I don’t think your formula would work that way. You’ll probably need to use a CASE WHEN statement like this:
Case when {Name} IN (‘Name1’, ‘Name2’, ‘Name3) then VALUE else OTHER VALUE end
If you are setting this on the Criteria tab of the saved search, you can probably use a Formula (Numeric) field and then return 1 when it meets the CASE WHEN statement. After that, set the Criteria value to 1.
Let me know if that works for you.
-
September 23, 2013 at 8:11 am #7800
EkosmerlWorks great! Thanks so much!
-
December 18, 2013 at 10:42 am #7801
kdormuthJust wanted to say thanks – this helped me, too!
-
May 8, 2014 at 4:23 pm #7802
ECHouseRE: Saved Search based on List of Values
Hi all, I’m a bit new to SQL enhanced searching. I have successfully added the following numeric formula to my Results: Case when {firstname} IN (‘Frank’, ‘Bob’, ‘Elizabeth’) then 1 else 0 end
I’m lost when it comes to setting “the Criteria value to 1″… what would that look like in this case?
In very much related news, can anyone recommend some resources for me to learn these SQL building blocks as they apply to Netsuite on my own?
Very hopefully yours,
Liz
rnedelkow replied on 03/06/2015, 01:38 PM: Hi Liz, you may have already seen these in SuiteAnswers, but here are a few good ones:
Answer Id: 8439
Answer Id: 10101
Answer Id: 10081
Answer Id: 8451
A popular formula thread on this forum is https://usergroup.netsuite.com/users…formula-fields
-
May 8, 2014 at 4:34 pm #7803
khultquistAlthough it’s nice and compact, you don’t have to use SQL to do this, you can do it with Expressions in your saved search. In your saved search Criteria, check ‘Use Expressions’, then use Parentheses and ‘Or’ for each line
So your criteria would look like this:
…
( First Name is Frank Or
First Name is Bob Or
First Name is Elizabeth ) And
…
-
May 9, 2014 at 8:51 am #7804
ECHouseThank you, khultquist. Unfortunately, my dream search isn’t that simple. I was hoping to be able to search against a list of hundreds of comma separated values.
-
February 28, 2015 at 1:48 am #7805
vdeymosNot sure if you’ve answered your question ECHouse, but if you place the formula in the Criteria tab of the search, it would look like this:
Filter: Formula (Numeric):
Pop-up window fields:
Formula: Case when {Name} IN (‘Name1’, ‘Name2’, ‘Name3’) then 1 else 0 end
Description: equal to
Value: 1
So when the formula runs, it would return a value of 1 when the name falls within the list of names you provided and it returns 0 if it doesn’t. The filter on the Criteria tab will only return results where the value is 1.
-
AuthorPosts
You must be logged in to reply to this topic.