<?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 use dynamic name to call name context ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287553#M61126</link>
    <description>&lt;P&gt;Here is my context.&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="context_user.png" style="width: 766px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyJw.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150375i97FD82EA6A2CBB0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyJw.png" alt="0683p000009LyJw.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;To get my context : &lt;/U&gt;&lt;/P&gt; 
&lt;P&gt;context.&lt;SPAN&gt;user12 &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I have my response : johnny&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Now, i want to get my context dynamically.&amp;nbsp;&lt;/SPAN&gt;I try different syntaxes but it's not ok&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;current_id = 12&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;context."user"+current_id &lt;FONT color="#FF0000"&gt;&amp;gt; cannot be resolved&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;context.user+current_id&lt;/FONT&gt;&amp;nbsp;&amp;gt; cannot be resolved&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Do you have any idea ?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jun 2018 13:34:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-13T13:34:41Z</dc:date>
    <item>
      <title>Can i use dynamic name to call name context ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287550#M61123</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;I have different name context like :&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;user12 = johnny&lt;/P&gt;
&lt;P&gt;user20 = bob&lt;/P&gt;
&lt;P&gt;user54 = billy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I my job, i have my id user.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Can i use a&amp;nbsp;dynamic name context like :&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;context."user"+id&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;or&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;String my_user = "user"+id;&lt;/P&gt;
&lt;P&gt;context.my_user&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try more syntaxes but it's not ok&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help,&lt;/P&gt;
&lt;P&gt;Arnaud&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 11:47:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287550#M61123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-13T11:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can i use dynamic name to call name context ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287551#M61124</link>
      <description>&lt;P&gt;no for context variable you can't do so.&lt;/P&gt;
&lt;P&gt;I try to help you if you explain your problem more clearly&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 12:29:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287551#M61124</guid>
      <dc:creator>aashish_21nov</dc:creator>
      <dc:date>2018-06-13T12:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can i use dynamic name to call name context ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287552#M61125</link>
      <description>&lt;P&gt;or you can do with the below strategy(in tJava component):&lt;/P&gt;&lt;P&gt;int id=25;&lt;/P&gt;&lt;P&gt;context.my_user = context.user+id; //where id is a variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 12:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287552#M61125</guid>
      <dc:creator>aashish_21nov</dc:creator>
      <dc:date>2018-06-13T12:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can i use dynamic name to call name context ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287553#M61126</link>
      <description>&lt;P&gt;Here is my context.&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="context_user.png" style="width: 766px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyJw.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150375i97FD82EA6A2CBB0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyJw.png" alt="0683p000009LyJw.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;To get my context : &lt;/U&gt;&lt;/P&gt; 
&lt;P&gt;context.&lt;SPAN&gt;user12 &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I have my response : johnny&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Now, i want to get my context dynamically.&amp;nbsp;&lt;/SPAN&gt;I try different syntaxes but it's not ok&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;current_id = 12&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;context."user"+current_id &lt;FONT color="#FF0000"&gt;&amp;gt; cannot be resolved&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;context.user+current_id&lt;/FONT&gt;&amp;nbsp;&amp;gt; cannot be resolved&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Do you have any idea ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:34:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287553#M61126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-13T13:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can i use dynamic name to call name context ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287554#M61127</link>
      <description>&lt;P&gt;You cannot construct context variable names as they must exist at compile time.&lt;/P&gt;&lt;P&gt;On the other hand, you can do it with global variables but depending of why you try to do, maybe it's not a solution for you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287554#M61127</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-13T13:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can i use dynamic name to call name context ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287555#M61128</link>
      <description>&lt;P&gt;I find a solution with a method context :&amp;nbsp;getProperty()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;String&amp;nbsp;my_user&amp;nbsp;= context.getProperty("user" +&amp;nbsp;current_id);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If my current_id doesn't match with an existing context name as&amp;nbsp;&lt;SPAN&gt;context.getProperty("user" + 25465) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt; return null&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&amp;nbsp;everyone !!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 14:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Can-i-use-dynamic-name-to-call-name-context/m-p/2287555#M61128</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-13T14:05:03Z</dc:date>
    </item>
  </channel>
</rss>

