cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering a search to 10 customers using condition formula

Nesh
Deputy Chef II
Deputy Chef II

I have a recipe where I am pulling invoices from the past 2 years. I want to add a condition where it will only pull records for 10 customers. I have not been very successful in setting up a formula using customer ID's. I have attached a copy of the condition I have currently. Any help is greatly appreciated. Thanks!recipeImage.png

4 REPLIES 4

gary1
Executive Chef III
Executive Chef III

It's very possible that the other conditions are conflicting with the ID condition, but I won't be able to tell without seeing all of them. You should test the query with only a single condition first to ensure it's working, and then build on additional conditions to ensure it keeps working.

With a single condition, try these steps:

  • If the ID in Epicor is stored as a string, turn off formula mode and use 2112, no quotes
  • If the ID in Epicor is stored as an integer, turn on formula mode and use 2112, no quotes

Nesh
Deputy Chef II
Deputy Chef II

Thanks Gary for the response!

So my recipe works when I use one customer ID. However, I want to retrieve data from 10 customers.  Do I just enter multiple customer ids and use "," to separate each? Like: 2112, 1234, 456, and so forth? That's where I am struggling. 

gary1
Executive Chef III
Executive Chef III

I'm not familiar with the platform and its API so I can't say for sure. Is this Epicor or some middleware?

It might take an array like:

 

[123, 456, 789]

 

Or a string:

 

"123, 456, 789"

 

Or maybe it has built in operators:

 

"123 OR 456 OR 789"

 

Another option would be to query each ID individually and combine them into a single array once you have all the results. It's not very efficient, but it will definitely work based on your testing so far.

Nesh
Deputy Chef II
Deputy Chef II

I will try these options with a fresh mind on Monday. Thank you once again for your help!