<?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: Detour based on Count in a Macro in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700331#M163045</link>
    <description>&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 1 doesn't work for me because at the point where the count is performed, the only record left is whether count = 0 or some other value.&amp;nbsp; I don't really care about the count, I care to branch the workflow based on whether there is a value or not.&amp;nbsp; I am already in a macro to run this because it is an iteration across multiple XML files and when running through the loop, I do not know whether specific field has values or not.&amp;nbsp; If they are present, then the path will be using the data from a 'True' statement, if they are not, they are through a 'False' statement.&amp;nbsp; I had an interface question through the use of a control and action parameter.&amp;nbsp; I just don't know how to formulate the Update Value With Formula to get the detour to toggle between true and false.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workflow you attached was for Method 1 and not Method 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I can't send the workflow or I would to show what I'm doing.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jan 2021 07:15:01 GMT</pubDate>
    <dc:creator>NeilFisk</dc:creator>
    <dc:date>2021-01-06T07:15:01Z</dc:date>
    <item>
      <title>Detour based on Count in a Macro</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700261#M163019</link>
      <description>&lt;P&gt;I am running a macro to parse out XML files that are not always consistent.&amp;nbsp; This requires me to detour through some of the workflow if under one run there are no records (i.e., using the Count tool equating to zero) and detour through a different workflow when it is not equal to zero.&amp;nbsp; I assumed I would use the Detour and Detour End tools for this but I don't know how to pass the updated value using the Control tool and Action tool to do so with an Update Value With Formula.&amp;nbsp; It seems that when I determine the Count, I cannot apply it in the formula.&amp;nbsp; Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 01:08:33 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700261#M163019</guid>
      <dc:creator>NeilFisk</dc:creator>
      <dc:date>2021-01-06T01:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Detour based on Count in a Macro</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700292#M163029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are at least a couple of ways to do branching like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 1) For a single workflow solution you can do the Count Records, then a Filter for Count &amp;gt; 0. Then the True output can be the source for an Append tool that then gets the original records appended to it. When there are 0 records then no records passed and the Append tool then returns 0 records (and a warning) whilst the False output out the Filter continues onwards with one record (the Count = 0): Here's a workflow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-01-05 at 10.18.49 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/164164iB73188F5F920898A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2021-01-05 at 10.18.49 PM.png" alt="Screen Shot 2021-01-05 at 10.18.49 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 2) We can't directly use data in order to redirect a Detour Start tool. In order to redirect a Detour Start tool we need to use a configuration output aka interface question from one of the interface tools, or a control parameter. Since the count is coming from a data stream then we need to use a control parameter; control parameters are the only way I know of to turn data values into configuration values. And when we use a control parameter that means that the logic affected by the control parameter needs to be embedded into a batch macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The flow I built for method 2 is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 03:33:43 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700292#M163029</guid>
      <dc:creator>jdrummey</dc:creator>
      <dc:date>2021-01-06T03:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Detour based on Count in a Macro</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700331#M163045</link>
      <description>&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Method 1 doesn't work for me because at the point where the count is performed, the only record left is whether count = 0 or some other value.&amp;nbsp; I don't really care about the count, I care to branch the workflow based on whether there is a value or not.&amp;nbsp; I am already in a macro to run this because it is an iteration across multiple XML files and when running through the loop, I do not know whether specific field has values or not.&amp;nbsp; If they are present, then the path will be using the data from a 'True' statement, if they are not, they are through a 'False' statement.&amp;nbsp; I had an interface question through the use of a control and action parameter.&amp;nbsp; I just don't know how to formulate the Update Value With Formula to get the detour to toggle between true and false.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workflow you attached was for Method 1 and not Method 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I can't send the workflow or I would to show what I'm doing.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 07:15:01 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-based-on-Count-in-a-Macro/m-p/700331#M163045</guid>
      <dc:creator>NeilFisk</dc:creator>
      <dc:date>2021-01-06T07:15:01Z</dc:date>
    </item>
  </channel>
</rss>

