<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unique List of records from an Epicor BAQ in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7909#M3325</link>
    <description>&lt;P&gt;Got it. Here's the easiest way I can think of doing this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Run your query to get results&lt;/LI&gt;&lt;LI&gt;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,&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;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)&lt;/LI&gt;&lt;LI&gt;In the JSON parser action, add the logger data pill as the Document&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The JSON parser will output a list, so you can use it as your input to your loop&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Give this a shot and let me know if you get stuck.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 16:33:48 GMT</pubDate>
    <dc:creator>gary1</dc:creator>
    <dc:date>2024-10-02T16:33:48Z</dc:date>
    <item>
      <title>Unique List of records from an Epicor BAQ</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7902#M3319</link>
      <description>&lt;P&gt;I have an Epicor BAQ with a list of Order Transactions that I use within a recipe that's working perfectly.&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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?&amp;nbsp;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 20:47:07 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7902#M3319</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2024-10-01T20:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unique List of records from an Epicor BAQ</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7903#M3320</link>
      <description>&lt;P&gt;This is definitely doable but it depends on what your end goal is.&lt;/P&gt;&lt;P&gt;If you just want a list of unique IDs, then pluck and uniq will work, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;orders = [{"id": 1}, {"id": 1}, {"id": 3}, {"id": 3}]

orders.pluck("id").uniq
## returns [1, 3]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This assumes you're determining uniqueness based on the ID only.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 21:45:26 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7903#M3320</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-10-01T21:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unique List of records from an Epicor BAQ</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7906#M3322</link>
      <description>&lt;P&gt;now this is probably a dumb question... not sure where I can add this formula... was thinking I could add it into the loop step but all it allows me to do is add the input list, I can't change to a formula field and do the pluck unique there so then was thinking I could create a list Batch and do it in that step but its not obvious&lt;/P&gt;&lt;P&gt;here s my recipe where Step 3 runs the BAQ and gives me lest say 20 records but only 3 unique records&lt;/P&gt;&lt;P&gt;I do the if to make sure its not empty and then loop through all the records... so it seems pretty straight forward just not sure how t insert this pluck unique before the loop step&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-10-02 081930.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1575i3C0BE581B4C6A665/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-10-02 081930.png" alt="Screenshot 2024-10-02 081930.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 13:22:37 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7906#M3322</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2024-10-02T13:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unique List of records from an Epicor BAQ</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7907#M3323</link>
      <description>&lt;P&gt;Are you trying to loop through&amp;nbsp;&lt;STRONG&gt;only&lt;/STRONG&gt; the unique records?&lt;/P&gt;&lt;P&gt;What you're trying to accomplish is something Workato makes very difficult to do. I'm happy to explain how to do it, but I want to make sure I understand what you're trying to accomplish before I spend the time.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:09:11 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7907#M3323</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-10-02T16:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unique List of records from an Epicor BAQ</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7908#M3324</link>
      <description>&lt;P&gt;yes... I just want to loop through the unique records&lt;/P&gt;&lt;P&gt;where the record would be 2 fields Company and Sales Order number&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:10:43 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7908#M3324</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2024-10-02T16:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unique List of records from an Epicor BAQ</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7909#M3325</link>
      <description>&lt;P&gt;Got it. Here's the easiest way I can think of doing this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Run your query to get results&lt;/LI&gt;&lt;LI&gt;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,&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;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)&lt;/LI&gt;&lt;LI&gt;In the JSON parser action, add the logger data pill as the Document&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The JSON parser will output a list, so you can use it as your input to your loop&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Give this a shot and let me know if you get stuck.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:33:48 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/unique-list-of-records-from-an-epicor-baq/m-p/7909#M3325</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-10-02T16:33:48Z</dc:date>
    </item>
  </channel>
</rss>

