cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Unique List of records from an Epicor BAQ

johnw
Executive Chef I
Executive Chef I

I have an Epicor BAQ with a list of Order Transactions that I use within a recipe that's working perfectly.

in a different recipe I want to see a list of Unique Order numbers on this report and didn't want to create a new BAQ

my thought was to execute the BAQ but only retrieve the 3 fields I need which will have lots of duplicates since every order can have multiple transactions.

was hoping there was some way to only show unique records when I execute the BAQ based on the 3 visible fields but don't see anything obvious... is there some combination of pluck and unique that works on a whole record as opposed to just one field in the record? 

John

 

5 REPLIES 5

gary1
Executive Chef III
Executive Chef III

Got it. Here's the easiest way I can think of doing this:

  1. Run your query to get results
  2. In a logger, do results.uniq. This will return an array of unique objects. This assumes the objects in your array are 100% identical. If even one key/value is different, 
  3. Add a JSON parser and copy/paste the output of the logger as the Sample Document (this has to be text and not a data pill)
  4. In the JSON parser action, add the logger data pill as the Document 
  5. The JSON parser will output a list, so you can use it as your input to your loop

Give this a shot and let me know if you get stuck.