<?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 Using a different variable in load script depending of field contents in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-different-variable-in-load-script-depending-of-field/m-p/1568271#M441881</link>
    <description>&lt;P&gt;I'm loading data and using&amp;nbsp;Firstworkdate to work out working days.&lt;/P&gt;&lt;P&gt;I've got a number of variables for each Country with list of non working days.&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;$(vHoliday_FR)&lt;/P&gt;&lt;P&gt;$(vHoliday_GB)&lt;/P&gt;&lt;P&gt;$(vHoliday_US)&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;I've got a field in my data called COUNTRY with a two letter country code in it for each row. i.e. FR, GB or US etc&lt;/P&gt;&lt;P&gt;What I want to do is use the COUNTRY field to select which variable I use.&amp;nbsp; How do I do that?&lt;/P&gt;&lt;P&gt;So instead of :&lt;/P&gt;&lt;P&gt;DATE( Firstworkdate(Num(ACTUAL_DEADLINE_PAYMENT_DATE_calc),2,$(vHoliday_SG) ))&lt;/P&gt;&lt;P&gt;I would have&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATE( Firstworkdate(Num(ACTUAL_DEADLINE_PAYMENT_DATE_calc),2,$(vHoliday_??) ))&lt;/P&gt;&lt;P&gt;where ?? is the&amp;nbsp;COUNTRY field. Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 14:56:11 GMT</pubDate>
    <dc:creator>shane_spencer</dc:creator>
    <dc:date>2019-04-11T14:56:11Z</dc:date>
    <item>
      <title>Using a different variable in load script depending of field contents</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-different-variable-in-load-script-depending-of-field/m-p/1568271#M441881</link>
      <description>&lt;P&gt;I'm loading data and using&amp;nbsp;Firstworkdate to work out working days.&lt;/P&gt;&lt;P&gt;I've got a number of variables for each Country with list of non working days.&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;$(vHoliday_FR)&lt;/P&gt;&lt;P&gt;$(vHoliday_GB)&lt;/P&gt;&lt;P&gt;$(vHoliday_US)&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;I've got a field in my data called COUNTRY with a two letter country code in it for each row. i.e. FR, GB or US etc&lt;/P&gt;&lt;P&gt;What I want to do is use the COUNTRY field to select which variable I use.&amp;nbsp; How do I do that?&lt;/P&gt;&lt;P&gt;So instead of :&lt;/P&gt;&lt;P&gt;DATE( Firstworkdate(Num(ACTUAL_DEADLINE_PAYMENT_DATE_calc),2,$(vHoliday_SG) ))&lt;/P&gt;&lt;P&gt;I would have&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATE( Firstworkdate(Num(ACTUAL_DEADLINE_PAYMENT_DATE_calc),2,$(vHoliday_??) ))&lt;/P&gt;&lt;P&gt;where ?? is the&amp;nbsp;COUNTRY field. Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 14:56:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-different-variable-in-load-script-depending-of-field/m-p/1568271#M441881</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2019-04-11T14:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using a different variable in load script depending of field contents</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-different-variable-in-load-script-depending-of-field/m-p/1568312#M441886</link>
      <description>&lt;P&gt;You could try it with something like this:&lt;/P&gt;&lt;P&gt;Firstworkdate(ACTUAL_DEADLINE_PAYMENT_DATE_calc,2,evaluate('vHoliday_' &amp;amp; Country))&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 15:59:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-different-variable-in-load-script-depending-of-field/m-p/1568312#M441886</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-04-11T15:59:28Z</dc:date>
    </item>
  </channel>
</rss>

