<?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: how to pass parameter dynamically without manual entry in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346516#M113909</link>
    <description>&lt;P&gt;I think there is a space char before "lastDec" in the globalMap.put opteration.&lt;/P&gt;&lt;P&gt;Can you check it?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 07:46:20 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2018-06-05T07:46:20Z</dc:date>
    <item>
      <title>how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346508#M113901</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;requirement is for every quarter i will go and change the parameter like mar-18 or sep-18 etc.&lt;/P&gt;
&lt;P&gt;Instead of that i have to load it dynamically without entering every time for each quarter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached test.xlsx which is the parameter file which contains company name, and 8 column with name parm 1,2,... so i am passing each parameter value in sql query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SQL Query&lt;/P&gt;
&lt;P&gt;INSERT INTO temp_report(SELECT&lt;BR /&gt;distinct b.bbcode,b.COMPANY ,b.Reco,b.Price,&lt;BR /&gt;(SELECT round(NET_SALES) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Revenue_Rs_m,&lt;BR /&gt;(SELECT round(NET_SALES) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM2"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS R_Year,&lt;BR /&gt;(SELECT round(NET_SALES) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM3"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS R_Quarter,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m-R_Year)/R_Year)*100 as decimal(10,1)) 'Revenue_Rs_m YOY%' FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Revenue_Rs_m YOY%',&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m-R_Quarter)/R_Quarter)*100 as decimal(10,1)) 'Revenue_Rs_m QOQ%' FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Revenue_Rs_m QOQ%',&lt;BR /&gt;(SELECT CAST(EBITDA_MARGIN as decimal(10,1)) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'EBITDA_MARGIN_Dec-17',&lt;BR /&gt;(SELECT CAST(EBITDA_MARGIN as decimal(10,1)) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM2"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'EBITDA_MARGIN_Dec-16',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Adjusted_PAT,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM2"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS A_Year,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM3"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS A_Quarter,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT-A_Year)/A_Year)*100 as decimal(10,1)) 'Adjusted_PAT YOY%' FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Adjusted_PAT YOY%',&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT-A_Quarter)/A_Quarter)*100 as decimal(10,1)) 'Adjusted_PAT QOQ%' FROM qtr_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM1"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Adjusted_PAT QOQ%',&lt;BR /&gt;(SELECT round(NET_SALES) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Revenue_Rs_m1,&lt;BR /&gt;(SELECT round(NET_SALES) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM4"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS R_Year1,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m1-R_Year1)/R_Year1)*100 as decimal(10,1)) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Revenue_Rs_m YOY1%',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Adjusted_PAT_Rs_m1,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM4"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS A_Year1,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT_Rs_m1-A_Year1)/A_Year1)*100 as decimal(10,1)) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Adjusted_PAT_Rs_m_YOY1%',&lt;BR /&gt;(SELECT round(NET_SALES) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Revenue_Rs_m2,&lt;BR /&gt;(SELECT round(NET_SALES) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS R_Year2,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m2-R_Year2)/R_Year2)*100 as decimal(10,1)) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Revenue_Rs_m YOY2%',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Adjusted_PAT_Rs_m2,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS A_Year2,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT_Rs_m2-A_Year2)/A_Year2)*100 as decimal(10,1)) 'Adjusted_PAT_Rs_m_YOY%' FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Adjusted_PAT_Rs_m_YOY%2',&lt;BR /&gt;(SELECT round(NET_SALES) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM7"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Revenue_Rs_m3,&lt;BR /&gt;(SELECT round(NET_SALES) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS R_Year3,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m3-R_Year3)/R_Year3)*100 as decimal(10,1)) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM7"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Revenue_Rs_m YOY%3',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM7"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS Adjusted_PAT_Rs_m3,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS A_Year3,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT_Rs_m3-A_Year3)/A_Year3)*100 as decimal(10,1)) FROM sch6_template WHERE YYYYMM = '" + ((String)globalMap.get("test_log.PARM7"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS 'Adjusted_PAT_Rs_m_YOY%3',&lt;BR /&gt;(SELECT CAST((RT_ADJ_EPS_RS) as decimal(10,1)) FROM sch6_template WHERE yyyymm = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS FY_1,&lt;BR /&gt;(SELECT CAST((RT_ADJ_EPS_RS) as decimal(10,1)) FROM sch6_template WHERE yyyymm = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS FY_2,&lt;BR /&gt;(SELECT CAST((RT_ADJ_EPS_RS) as decimal(10,1)) FROM sch6_template WHERE yyyymm = '" + ((String)globalMap.get("test_log.PARM7"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS FY_3,&lt;BR /&gt;(SELECT CAST((price/FY_1) as decimal(10,1)) FY18_X FROM sch6_template WHERE yyyymm = '" + ((String)globalMap.get("test_log.PARM5"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS FY18_X,&lt;BR /&gt;(SELECT CAST((price/FY_2) as decimal(10,1)) FY19_X FROM sch6_template WHERE yyyymm = '" + ((String)globalMap.get("test_log.PARM6"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS FY19_X,&lt;BR /&gt;(SELECT CAST((price/FY_3) as decimal(10,1)) FY20_X FROM sch6_template WHERE yyyymm = '" + ((String)globalMap.get("test_log.PARM7"))+"' and BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"') AS FY20_X&lt;BR /&gt;FROM price_and_reco b where b.BBCODE='" + ((String)globalMap.get("test_log.BBCODE"))+"');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Logic is if my current year is dec-17, then for quarter i need sep-17 and for year i need dec-16&lt;/P&gt;
&lt;P&gt;the above is first requirement&lt;/P&gt;
&lt;P&gt;similarly for next quarter is mar-18 then, i should not go to the parameter file and change the values.&lt;/P&gt;
&lt;P&gt;so i need for quarter dec-17 and for year mar-17 automatically&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 08:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346508#M113901</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-05-25T08:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346509#M113902</link>
      <description>&lt;P&gt;Your question is not so clear but you should have a look at &lt;A href="https://help.talend.com/reader/~R4Lk_SlELw9a8pKBKTm9A/JFWl8U3lEbhWZEFAUtYvMw" target="_self" rel="nofollow noopener noreferrer"&gt;Talend Date routines chapter from documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;However, from my understanding of what you want, this piece of code may help you:&lt;/P&gt;
&lt;PRE&gt;Date lastDec = TalendDate.ADD_TO_DATE(TalendDate.setDate(TalendDate.getCurrentDate(), 12, "MM"), "YYYY", -1);&lt;BR /&gt;System.out.println("lastDec: "+TalendDate.TO_CHAR(lastDec, "yyyyMM"));&lt;BR /&gt;&lt;BR /&gt;Date lastQ3 = TalendDate.ADD_TO_DATE(TalendDate.setDate(lastDec, 12, "MM"), "MONTH", -3);&lt;BR /&gt;System.out.println("lastQ3: "+TalendDate.TO_CHAR(lastQ3, "yyyyMM"));&lt;BR /&gt;&lt;BR /&gt;Date prevYear = TalendDate.ADD_TO_DATE(lastDec, "YYYY", -1);&lt;BR /&gt;System.out.println("prevYear: "+TalendDate.TO_CHAR(prevYear, "yyyyMM"));&lt;BR /&gt;&lt;BR /&gt;Date nextQ1 = TalendDate.ADD_TO_DATE(lastDec, "MONTH", +3);&lt;BR /&gt;System.out.println("nextQ1: "+TalendDate.TO_CHAR(nextQ1, "yyyyMM"));&lt;/PRE&gt;
&lt;P&gt;Just copy/past to a tJava component and run the job.&lt;/P&gt;
&lt;P&gt;Here is the result:&lt;/P&gt;
&lt;PRE&gt;Démarrage du job test a 11:33 26/05/2018.&lt;BR /&gt;[statistics] connecting to socket on port 3393&lt;BR /&gt;[statistics] connected&lt;BR /&gt;lastDec: 201712&lt;BR /&gt;lastQ3: 201709&lt;BR /&gt;prevYear: 201612&lt;BR /&gt;nextQ1: 201803&lt;BR /&gt;[statistics] disconnected&lt;BR /&gt;Job test terminé à 11:33 26/05/2018. [Code sortie=0]&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 May 2018 10:34:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346509#M113902</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-26T10:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346510#M113903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you tell me how to pass the output values in sql query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Explain me in steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 12:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346510#M113903</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-05-28T12:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346511#M113904</link>
      <description>&lt;P&gt;You just have to replace Java locale variable from the example by global variable that you can reuse into your &lt;SPAN&gt;SQL statement&lt;/SPAN&gt; as it is in your 1rst query.&lt;/P&gt; 
&lt;P&gt;Use a tJavaRow to place the necessary code for each needed variable.&lt;/P&gt; 
&lt;P&gt;For example:&lt;/P&gt; 
&lt;PRE&gt;globalMap.put("lastDec", &lt;BR /&gt;    TalendDate.TO_CHAR(TalendDate.ADD_TO_DATE(&lt;BR /&gt;        TalendDate.setDate(TalendDate.getCurrentDate(), 12, "MM"), "YYYY", -1), "yyyyMM"));&lt;BR /&gt;&lt;BR /&gt;globalMap.put("lastQ3", &lt;BR /&gt;    TalendDate.TO_CHAR(TalendDate.ADD_TO_DATE(&lt;BR /&gt;        TalendDate.setDate(lastDec, 12, "MM"), "MONTH", -3), "yyyyMM");&lt;/PRE&gt; 
&lt;P&gt;You may also put the code directly into your SQL statement but as it is long, it seems not a good idea.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 13:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346511#M113904</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-28T13:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346512#M113905</link>
      <description>&lt;P&gt;Hi TRF,&lt;/P&gt;&lt;P&gt;Can you explain me steps with components. I am new to talend.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 06:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346512#M113905</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-05-30T06:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346513#M113906</link>
      <description>&lt;P&gt;Hi TRF,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;still am not able solve this.&lt;/P&gt; 
&lt;P&gt;whether the component which i have used is correct. if not let me know the steps.&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="a.PNG" style="width: 795px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lyq2.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131918iF8ADED30BE4D8B49/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lyq2.png" alt="0683p000009Lyq2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="b.PNG" style="width: 966px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ly2t.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157631i46FD2B4DA5A5F315/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ly2t.png" alt="0683p000009Ly2t.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 07:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346513#M113906</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-04T07:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346514#M113907</link>
      <description>&lt;P&gt;2 things you have to change:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;tJavaRow should not br the 1rst component of your subjob as it expect an input flow. If you don't have an input flow, just replace tJavaRow by tJava&lt;/LI&gt;&lt;LI&gt;the variables you set in your component are "lastDec" and "lastQ3" but in your tMySqlRow you use "test_log.lastDec" and "last_log.&lt;SPAN&gt;lastQ3" and I'm afraid they null, so you have to change the variables name&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Mon, 04 Jun 2018 08:23:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346514#M113907</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-04T08:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346515#M113908</link>
      <description>&lt;P&gt;Thanks TRF,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;that's works fine.&lt;/P&gt; 
&lt;P&gt;one doubt. when i'm passing the below code in tjava, i am getting the output.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date lastDec = TalendDate.getCurrentDate();&lt;BR /&gt;System.out.println("lastDec: "+TalendDate.TO_CHAR(lastDec, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;O/P&lt;/P&gt; 
&lt;P&gt;Jun-18&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;the same code am passing thru globalvar, am getting null in tjava.&lt;/P&gt; 
&lt;P&gt;correct me on the code.&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="a.PNG" style="width: 663px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyWW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153134i11CF8A95FFB67CE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyWW.png" alt="0683p000009LyWW.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="b.PNG" style="width: 835px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyWb.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152559i42C8C0ACC8A2A935/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyWb.png" alt="0683p000009LyWb.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 07:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346515#M113908</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-05T07:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346516#M113909</link>
      <description>&lt;P&gt;I think there is a space char before "lastDec" in the globalMap.put opteration.&lt;/P&gt;&lt;P&gt;Can you check it?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 07:46:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346516#M113909</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-05T07:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346517#M113910</link>
      <description>&lt;P&gt;Checked...there is no space .&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 07:51:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346517#M113910</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-05T07:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346518#M113911</link>
      <description>&lt;P&gt;Works fine for me.&lt;/P&gt;&lt;P&gt;Retry with this piece of code:&lt;/P&gt;&lt;PRE&gt;globalMap.put("lastDec", TalendDate.TO_CHAR(TalendDate.getCurrentDate(), "YYYYMM"));
System.out.println("global: " + globalMap.get("lastDec"));&lt;/PRE&gt;&lt;P&gt;What's the value printed on the console?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 08:11:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346518#M113911</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-05T08:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346519#M113912</link>
      <description>&lt;P&gt;still am not getting any values.&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="a.PNG" style="width: 721px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyWg.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138762iF5C9E71A1D35E6A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyWg.png" alt="0683p000009LyWg.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="b.PNG" style="width: 861px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyH4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154559i25A5C94B5EEC8F60/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyH4.png" alt="0683p000009LyH4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;these are all the code, which i want to change it to globalmap.put&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date lastDec =TalendDate.parseDate("yyyy-MM-dd", TalendDate.getDate("yyyy-MM-dd"));&lt;BR /&gt;System.out.println("param1: "+TalendDate.TO_CHAR(lastDec, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date prevYear1 = TalendDate.ADD_TO_DATE(lastDec, "YYYY", -1);&lt;BR /&gt;System.out.println("param3: "+TalendDate.TO_CHAR(prevYear1, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date prevYear = TalendDate.ADD_TO_DATE(lastDec, "MM", -3);&lt;BR /&gt;System.out.println("param2: "+TalendDate.TO_CHAR(prevYear, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date Year2 = TalendDate.ADD_TO_DATE(TalendDate.setDate(TalendDate.getCurrentDate(), 03, "MM"), "YYYY", 0);&lt;BR /&gt;System.out.println("para5: "+TalendDate.TO_CHAR(Year2, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date Year1 = TalendDate.ADD_TO_DATE(Year2, "YYYY", -1);&lt;BR /&gt;System.out.println("param4: "+TalendDate.TO_CHAR(Year1, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date Year3 = TalendDate.ADD_TO_DATE(Year2, "YYYY", +1);&lt;/P&gt; 
&lt;P&gt;System.out.println("param6: "+TalendDate.TO_CHAR(Year3, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Date Year4 = TalendDate.ADD_TO_DATE(Year3, "YYYY", +1);&lt;BR /&gt;System.out.println("param7: "+TalendDate.TO_CHAR(Year4, "MMM-yy"));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;kindly help me out.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:06:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346519#M113912</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-05T09:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass parameter dynamically without manual entry</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346520#M113913</link>
      <description>&lt;P&gt;Hi TRF,&lt;/P&gt;
&lt;P&gt;I have tried the code using globalmap&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; &amp;nbsp;globalMap.put("lastDec",&lt;BR /&gt;TalendDate.TO_CHAR(TalendDate.ADD_TO_DATE(&lt;BR /&gt;TalendDate.setDate(TalendDate.getCurrentDate(), 12, "MM"), "YYYY", -1), "yyyyMM"));&lt;BR /&gt;2.&amp;nbsp; &amp;nbsp; globalMap.put("lastQ3",&lt;BR /&gt;TalendDate.TO_CHAR(TalendDate.ADD_TO_DATE(&lt;BR /&gt;TalendDate.setDate(lastDec, 12, "MM"), "MONTH", -3), "yyyyMM"));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;only first one is working. 2nd is not working. similarly i need for the remaining code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-pass-parameter-dynamically-without-manual-entry/m-p/2346520#M113913</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-05T11:26:48Z</dc:date>
    </item>
  </channel>
</rss>

