<?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: Sorting / ordering a list input to a repeat for each action in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9585#M3905</link>
    <description>&lt;P&gt;That worked a treat! Thanks again Gary.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Apr 2025 11:49:07 GMT</pubDate>
    <dc:creator>DanM</dc:creator>
    <dc:date>2025-04-10T11:49:07Z</dc:date>
    <item>
      <title>Sorting / ordering a list input to a repeat for each action</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9578#M3901</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I have a recipe that creates sales orders (header and lines) in Dynamics 365 F&amp;amp;O (ERP).&lt;/P&gt;&lt;P&gt;I use a repeat for each action to create the sales order lines. The step input list is a list of the relevant line item data which includes a sequence number field.&lt;/P&gt;&lt;P&gt;I cannot guarantee the input list is sorted / ordered by the sequence number, but, I do want to create the D365 sales order lines in sequence number order.&lt;/P&gt;&lt;P&gt;What's the recommended way to sort / order the input list so that I can control the order that the repeat for each action iterates through the list?&lt;/P&gt;&lt;P&gt;I'm sure I'm missing something obvious, but I've not been able to find an answer in the documentation or these boards.&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 19:30:22 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9578#M3901</guid>
      <dc:creator>DanM</dc:creator>
      <dc:date>2025-04-09T19:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting / ordering a list input to a repeat for each action</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9580#M3903</link>
      <description>&lt;P&gt;I don't know of a native way to do this without using loops and a billion tasks.&lt;/P&gt;&lt;P&gt;I would use a Ruby or JS action to sort the array. Ruby sorting is pretty straightforward:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;array.sort_by{ | a | a["sequence_number"] }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 21:52:23 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9580#M3903</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2025-04-09T21:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting / ordering a list input to a repeat for each action</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9581#M3904</link>
      <description>&lt;P&gt;Thanks Gary, I’ll give that a go.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 22:01:42 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9581#M3904</guid>
      <dc:creator>DanM</dc:creator>
      <dc:date>2025-04-09T22:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting / ordering a list input to a repeat for each action</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9585#M3905</link>
      <description>&lt;P&gt;That worked a treat! Thanks again Gary.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 11:49:07 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/sorting-ordering-a-list-input-to-a-repeat-for-each-action/m-p/9585#M3905</guid>
      <dc:creator>DanM</dc:creator>
      <dc:date>2025-04-10T11:49:07Z</dc:date>
    </item>
  </channel>
</rss>

