<?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: Can i call contextvariable by it value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266224#M45520</link>
    <description>What's the background story? Elaborate please? What are you trying to achieve?&lt;BR /&gt;Are you looking for a way to read and write global variables? globalMap.put / .get ?&lt;BR /&gt;&lt;BR /&gt;Help us out!?</description>
    <pubDate>Thu, 06 Sep 2018 13:41:08 GMT</pubDate>
    <dc:creator>Jesperrekuh</dc:creator>
    <dc:date>2018-09-06T13:41:08Z</dc:date>
    <item>
      <title>Can i call contextvariable by it value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266223#M45519</link>
      <description>&lt;P&gt;Can i read context.Variable by its value, lets say&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 3&amp;nbsp;context variables in a job&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Variable Name-----------------Datatype------------Value&lt;/P&gt;
&lt;P&gt;context.Student---------------String----------------Name,Email&lt;/P&gt;
&lt;P&gt;context.Name-----------------String----------------Meet&lt;/P&gt;
&lt;P&gt;context.Email-------------------String-----------------m@gmail.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is only one&amp;nbsp;&lt;SPAN&gt;component in my job 'tJava', and in &lt;/SPAN&gt;that i&lt;SPAN&gt; have written &lt;/SPAN&gt;following&lt;SPAN&gt; code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;----------------------------------CODE--------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;String student = context.Student;&lt;/P&gt;
&lt;P&gt;String[] students = student.split(",");&lt;/P&gt;
&lt;P&gt;for ( int i = 0 ; i&amp;lt;students.length;i++)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;System.out.println(students[i].trim()); //prints Name and Email&lt;/P&gt;
&lt;P&gt;System.out.println(context[students[i]]); //want to print the Value of "context.Name" and "context.Email"&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-----------------------------------tJava throws Error-----------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help and let me know if more information needed on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Meet&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266223#M45519</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T13:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can i call contextvariable by it value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266224#M45520</link>
      <description>What's the background story? Elaborate please? What are you trying to achieve?&lt;BR /&gt;Are you looking for a way to read and write global variables? globalMap.put / .get ?&lt;BR /&gt;&lt;BR /&gt;Help us out!?</description>
      <pubDate>Thu, 06 Sep 2018 13:41:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266224#M45520</guid>
      <dc:creator>Jesperrekuh</dc:creator>
      <dc:date>2018-09-06T13:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can i call contextvariable by it value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266225#M45521</link>
      <description>&lt;P&gt;Reading Global variable using its value&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suppose Student contains 'Name'&lt;/P&gt;&lt;P&gt;in my code i'm getting Name as a output and then i&amp;nbsp;want to get value of&amp;nbsp; "Name" context in my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meet&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266225#M45521</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T13:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can i call contextvariable by it value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266226#M45522</link>
      <description>&lt;P&gt;Achieved my requirements&lt;/P&gt;&lt;P&gt;Instead of writing&lt;/P&gt;&lt;P&gt;System.out.println(context[students[i]].trim());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got a solution using this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.out.println( context.getProperty(students[i]).trims() );&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Meet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 14:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-call-contextvariable-by-it-value/m-p/2266226#M45522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-06T14:01:44Z</dc:date>
    </item>
  </channel>
</rss>

