<?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 Condition is false but step is still executed in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6962#M2999</link>
    <description>&lt;P&gt;Hi - I need help please on a strange situation...&lt;/P&gt;&lt;P&gt;I have a simple IF condition checks if an integer variable is greater than zero.&amp;nbsp; When I run the job I can see that integer is in fact zero, and that the condition evaluates to &lt;EM&gt;false,&lt;/EM&gt; but it is still executing the steps within the condition.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;As a test to make sure the steps were truly nested within the condition, I changed the condition to if&amp;nbsp;&lt;EM&gt;true&amp;nbsp;&lt;/EM&gt;equals&amp;nbsp;&lt;EM&gt;false,&amp;nbsp;&lt;/EM&gt;which evaluated to &lt;EM&gt;false&lt;/EM&gt; as expected, and skipped the contained steps, as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried&amp;nbsp;&lt;EM&gt;not equal&amp;nbsp;&lt;/EM&gt;to zero &amp;gt; condition is&amp;nbsp;&lt;EM&gt;false&amp;nbsp;&lt;/EM&gt;as expected but the steps are executed.&amp;nbsp; And just for fun&amp;nbsp;&lt;EM&gt;equal&amp;nbsp;&lt;/EM&gt;to zero &amp;gt; condition is&amp;nbsp;&lt;EM&gt;true&amp;nbsp;&lt;/EM&gt;as expected and steps are executed as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone seen this before where it goes into the steps even when the condition fails?&amp;nbsp; Thanks in advance!&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 20:30:36 GMT</pubDate>
    <dc:creator>jashmore</dc:creator>
    <dc:date>2024-06-26T20:30:36Z</dc:date>
    <item>
      <title>Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6962#M2999</link>
      <description>&lt;P&gt;Hi - I need help please on a strange situation...&lt;/P&gt;&lt;P&gt;I have a simple IF condition checks if an integer variable is greater than zero.&amp;nbsp; When I run the job I can see that integer is in fact zero, and that the condition evaluates to &lt;EM&gt;false,&lt;/EM&gt; but it is still executing the steps within the condition.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;As a test to make sure the steps were truly nested within the condition, I changed the condition to if&amp;nbsp;&lt;EM&gt;true&amp;nbsp;&lt;/EM&gt;equals&amp;nbsp;&lt;EM&gt;false,&amp;nbsp;&lt;/EM&gt;which evaluated to &lt;EM&gt;false&lt;/EM&gt; as expected, and skipped the contained steps, as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried&amp;nbsp;&lt;EM&gt;not equal&amp;nbsp;&lt;/EM&gt;to zero &amp;gt; condition is&amp;nbsp;&lt;EM&gt;false&amp;nbsp;&lt;/EM&gt;as expected but the steps are executed.&amp;nbsp; And just for fun&amp;nbsp;&lt;EM&gt;equal&amp;nbsp;&lt;/EM&gt;to zero &amp;gt; condition is&amp;nbsp;&lt;EM&gt;true&amp;nbsp;&lt;/EM&gt;as expected and steps are executed as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone seen this before where it goes into the steps even when the condition fails?&amp;nbsp; Thanks in advance!&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 20:30:36 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6962#M2999</guid>
      <dc:creator>jashmore</dc:creator>
      <dc:date>2024-06-26T20:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6963#M3000</link>
      <description>&lt;P&gt;Can you share how the condition is written and maybe a screenshot of the input and output?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 21:46:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6963#M3000</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-06-26T21:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6972#M3001</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3 Define RowCount2 Variable.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1400iC30024405CF75801/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="3 Define RowCount2 Variable.png" alt="3 Define RowCount2 Variable.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2 Define Condition.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1401i6B0A583C22FB1B05/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="2 Define Condition.png" alt="2 Define Condition.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1 Define RowCount Variable.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1399i898728615279D6A3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="1 Define RowCount Variable.png" alt="1 Define RowCount Variable.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6 Inspect RowCount2.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1398i19070B79DFA43549/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="6 Inspect RowCount2.png" alt="6 Inspect RowCount2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5 Inspect Condition.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1402i33C8D46A54E3AF82/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="5 Inspect Condition.png" alt="5 Inspect Condition.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4 Inspect RowCount.png" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/1403i13091D66D5E5498F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="4 Inspect RowCount.png" alt="4 Inspect RowCount.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 22:03:22 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6972#M3001</guid>
      <dc:creator>jashmore</dc:creator>
      <dc:date>2024-06-26T22:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6973#M3002</link>
      <description>&lt;P&gt;The screenshots didn't upload in order unfortunately, but there are 6 screenshots.&amp;nbsp; 3 screenshots defining the RowCount variable, the condition and the RowCount2 variable... and 3 screenshots inspecting RowCount, the condition and RowCount2.&amp;nbsp; Thanks for taking a look!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 22:06:13 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6973#M3002</guid>
      <dc:creator>jashmore</dc:creator>
      <dc:date>2024-06-26T22:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6974#M3003</link>
      <description>&lt;P&gt;Is this running within a loop?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 02:37:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6974#M3003</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-06-27T02:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6975#M3004</link>
      <description>&lt;P&gt;I think I need to see more of the recipe to get a better idea of what's happening. Here are some thoughts:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Dupe the recipe and re-run it. This sometimes fixes "illogical" behavior.&lt;/LI&gt;&lt;LI&gt;Add a logger inside the conditional to capture RowCount. Something funky is happening there. Do you have another RowCount variable somewhere in the recipe?&lt;/LI&gt;&lt;LI&gt;Try recreating RowCount as a different variable. Maybe a variable schema thing?&lt;/LI&gt;&lt;LI&gt;If this recipe segment is within a loop, there might be something else happening, but I can't really see.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 27 Jun 2024 02:52:15 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6975#M3004</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-06-27T02:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6977#M3006</link>
      <description>&lt;P&gt;The first thing that came to mind to me was a data type issue, like comparing a string against a number.&amp;nbsp; But your screenshots show the variable is an integer, and the IF condition always says ABC.&amp;nbsp; But for chuckles, maybe try changing the IF to be formula mode and see if RowCount &amp;gt; 0 as the formula (and the condition just becomes "is true") and see what does?&amp;nbsp; You can also use some logger steps to evaluate formulas to see how they wind up, like RowCount = 0, RowCount = "0", etc.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 12:42:48 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6977#M3006</guid>
      <dc:creator>mppowe</dc:creator>
      <dc:date>2024-06-27T12:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6978#M3007</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/3769"&gt;@mppowe&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I think it's not a problem because I tried with an example, it worked for me.&lt;BR /&gt;&lt;BR /&gt;Even if we use the number specified as a string in the comparison, it does not cause problems. But I agree Ideally we should use it in formula mode for numbers.&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/10222"&gt;@jashmore&lt;/a&gt;&amp;nbsp; If you provide us the whole recipe screenshot we can predict what can be the issue.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Shivakumara Avadhani&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 13:30:04 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6978#M3007</guid>
      <dc:creator>shivakumara</dc:creator>
      <dc:date>2024-06-27T13:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Condition is false but step is still executed</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6979#M3008</link>
      <description>&lt;P&gt;Thanks for your help - it's working as expected now.&amp;nbsp; Yes, it's running within a loop and I think you were right to suggest that as the issue. The variables RowCount and RowCount2 were just to simplify the situation.&amp;nbsp; &amp;nbsp;The underlying issue I think was that within the loop I was doing a batch insert from a variable list into a SQL Collection, including list creation if needed, (and clearing both the variable list and SQL collection on each loop).&amp;nbsp; I was then querying the SQL Collection and it was the ListSize of the query results that was giving inaccurate results.&amp;nbsp; I moved the SQL Collection creation outside of the loop - I still batch insert and delete within the loop and it's working as expected now.&amp;nbsp; &amp;nbsp;There may be some other nuance that I affected in my experiments too that I'm missing, but I'm not going to mess with it any more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 14:55:02 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/condition-is-false-but-step-is-still-executed/m-p/6979#M3008</guid>
      <dc:creator>jashmore</dc:creator>
      <dc:date>2024-06-27T14:55:02Z</dc:date>
    </item>
  </channel>
</rss>

