<?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 How to Use Context Variable on Run if Row Component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324105#M93854</link>
    <description>Hi..&lt;BR /&gt;I have handle SQL Server&amp;nbsp; error in stored procedure using TRY and CATCH Block.Stored Procedure gives the Error output as &lt;BR /&gt;ErrorMessage ,ErrorSeverity and ErrorState.All these values are stored in context variables.&lt;BR /&gt;On RunIf Trigger i want check condition as mentioned belowed:-&lt;BR /&gt;If ErrorState has no value then it should execute next sub job of extracting data from table into CSV file.&lt;BR /&gt;And ErrorState has value then it should not execute next sub job.&lt;BR /&gt;Thanks in Advance for help&lt;BR /&gt;Regards&lt;BR /&gt;Amruta Joshi</description>
    <pubDate>Sat, 16 Nov 2024 11:28:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T11:28:46Z</dc:date>
    <item>
      <title>How to Use Context Variable on Run if Row Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324105#M93854</link>
      <description>Hi..&lt;BR /&gt;I have handle SQL Server&amp;nbsp; error in stored procedure using TRY and CATCH Block.Stored Procedure gives the Error output as &lt;BR /&gt;ErrorMessage ,ErrorSeverity and ErrorState.All these values are stored in context variables.&lt;BR /&gt;On RunIf Trigger i want check condition as mentioned belowed:-&lt;BR /&gt;If ErrorState has no value then it should execute next sub job of extracting data from table into CSV file.&lt;BR /&gt;And ErrorState has value then it should not execute next sub job.&lt;BR /&gt;Thanks in Advance for help&lt;BR /&gt;Regards&lt;BR /&gt;Amruta Joshi</description>
      <pubDate>Sat, 16 Nov 2024 11:28:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324105#M93854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use Context Variable on Run if Row Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324106#M93855</link>
      <description>Assuming that, by "no value" you mean null :-&lt;BR /&gt;Your two If tests are simply :-&lt;BR /&gt;context.ErrorState == null&lt;BR /&gt;context.ErrorState != null</description>
      <pubDate>Mon, 06 Oct 2014 15:47:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324106#M93855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-06T15:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use Context Variable on Run if Row Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324107#M93856</link>
      <description>Hi..&lt;BR /&gt;CASE 1:-&lt;BR /&gt;Snippet Code:-&amp;nbsp;&lt;BR /&gt;BEGIN CATCH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ErrorMessage NVARCHAR(4000) = ERROR_MESSAGE();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ErrorSeverity INT = ERROR_SEVERITY();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ErrorState INT = ERROR_STATE();&lt;BR /&gt;&amp;nbsp; END CATCH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --Retrieves the error message along with RowId and BatchTransId where error occured&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT @ErrorMessage As ErrorMessage,@ErrorSeverity As ErrorSeverity,@ErrorState&amp;nbsp; As ErrorState&amp;nbsp;&lt;BR /&gt;Then i get ErrorMessage with value as null and set in context Variable and Checks Context.ErrorMessage==null in RunIf Trigger It works fine.&lt;BR /&gt;But In CASE2 :-&lt;BR /&gt;BEGIN CATCH&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ErrorMessage NVARCHAR(4000) = ERROR_MESSAGE();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ErrorSeverity INT = ERROR_SEVERITY();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; DECLARE @ErrorState INT = ERROR_STATE();&lt;BR /&gt;&amp;nbsp; SELECT @ErrorMessage As ErrorMessage,@ErrorSeverity As ErrorSeverity,@ErrorState&amp;nbsp; As ErrorState &lt;BR /&gt; &amp;nbsp; END CATCH&lt;BR /&gt;In this Case Select statement will executed if error occurs ,but no errors occurs errorMessage will have no value.&lt;BR /&gt;Since Context variables are in tjava_row component&lt;BR /&gt;How to check the whether Context .ErrorMessage has value or not?&lt;BR /&gt;Thanks for ur help in advance.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Thu, 09 Oct 2014 15:27:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-Context-Variable-on-Run-if-Row-Component/m-p/2324107#M93856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-09T15:27:26Z</dc:date>
    </item>
  </channel>
</rss>

