<?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: Creating a component need help retrieving a string value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331099#M100119</link>
    <description>&lt;P&gt;Not sure (not much experience creating components), but&amp;nbsp;while generating the code, it resolves to a var name in stead of a string value, "\"POST\""&amp;nbsp; escape your quotes.&lt;/P&gt;&lt;P&gt;Why not use default and set it to POST&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2018 01:53:56 GMT</pubDate>
    <dc:creator>Jesperrekuh</dc:creator>
    <dc:date>2018-05-17T01:53:56Z</dc:date>
    <item>
      <title>Creating a component need help retrieving a string value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331098#M100118</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am in the process to create a new component. I am able to retrieve all parameters as strings except for a Parameter closed list, which gets pickup as a variable and not a string.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The METHOD parameters is the only CLOSED_LIST parameter. Please see XML below.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2018-05-16 23.35.45.png" style="width: 890px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lx4s.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133494i3335CCF202DAE576/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lx4s.png" alt="0683p000009Lx4s.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I used a standard ElementParameterParser.getValue to retrieve the set value.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2018-05-16 23.18.03.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lxgz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136706i5E20DE0B40CD7358/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lxgz.png" alt="0683p000009Lxgz.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here I set my string Variable with the value I just retrieved.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2018-05-16 23.18.24.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwyL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158115iB607F2A5100188AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwyL.png" alt="0683p000009LwyL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;As you see, when I try to run it, I get a message that the system cannot resolve the POST variable, but it is not a variable but a value of the httpMethod_&amp;lt;%=cid%&amp;gt; value.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2018-05-16 23.19.45.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lxh9.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133857i1F131EBEFCD86D1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lxh9.png" alt="0683p000009Lxh9.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I look at the code, I can see all my other variable were set properly but for my&lt;SPAN&gt;httpMethod_&amp;lt;%=cid%&amp;gt; variable value. The POST was set without the quotation mark. When I hard code the POST value, than the component works as expected.&lt;/SPAN&gt;&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-center" image-alt="Screenshot 2018-05-16 23.20.21.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LxTX.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158111i1CC072A064162F25/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LxTX.png" alt="0683p000009LxTX.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any help to resolve this would be very much appreciated.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Joseph&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331098#M100118</guid>
      <dc:creator>joefrancois</dc:creator>
      <dc:date>2024-11-16T08:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a component need help retrieving a string value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331099#M100119</link>
      <description>&lt;P&gt;Not sure (not much experience creating components), but&amp;nbsp;while generating the code, it resolves to a var name in stead of a string value, "\"POST\""&amp;nbsp; escape your quotes.&lt;/P&gt;&lt;P&gt;Why not use default and set it to POST&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 01:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331099#M100119</guid>
      <dc:creator>Jesperrekuh</dc:creator>
      <dc:date>2018-05-17T01:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a component need help retrieving a string value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331100#M100120</link>
      <description>&lt;P&gt;I realized that I had to append the quotes as I was reading in the variable. Here is the line I changed that got me the result I was looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;String method = "\""+ElementParameterParser.getValue(node,"__METHOD__")+"\"";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your support.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 21:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-a-component-need-help-retrieving-a-string-value/m-p/2331100#M100120</guid>
      <dc:creator>joefrancois</dc:creator>
      <dc:date>2018-05-17T21:45:54Z</dc:date>
    </item>
  </channel>
</rss>

