<?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: Script variable dollar expansion help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514960#M601603</link>
    <description>&lt;P&gt;Not sure if I understand your issue correct. Is this what you want:&lt;/P&gt;&lt;P&gt;Not: set SEt_x = 'OHDs (@ ' &amp;amp; num($'&amp;amp;'(vOHD),'0%') &amp;amp; ')';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But: let let_x = 'OHDs '&amp;amp; $(vOHD)&amp;amp;' %';&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="2018-11-30 15_48_44-QlikView x64 - [D__QlikView_Uitzoekertjes_Community uitzoeken.qvw_].jpg" style="width: 200px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1380i1193C44E3788F38A/image-size/small?v=v2&amp;amp;px=200" role="button" title="2018-11-30 15_48_44-QlikView x64 - [D__QlikView_Uitzoekertjes_Community uitzoeken.qvw_].jpg" alt="2018-11-30 15_48_44-QlikView x64 - [D__QlikView_Uitzoekertjes_Community uitzoeken.qvw_].jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Nov 2018 14:53:41 GMT</pubDate>
    <dc:creator>Michiel_QV_Fan</dc:creator>
    <dc:date>2018-11-30T14:53:41Z</dc:date>
    <item>
      <title>Script variable dollar expansion help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514510#M601602</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I can normally figure these out but this has had me banging my head against the wall.&lt;/P&gt;&lt;P&gt;On the tab I have an Input Box with a variable called vOHD which contains a decimal that the user can change.&lt;/P&gt;&lt;P&gt;I am trying to create a dynamic title for a chart which references the vOHD value (and displays it as a percentage).&amp;nbsp; I want to store that in another variable which I want to create in the load script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: 'OHD (' &amp;amp; num($(vOHD),'0%') &amp;amp; ')' which would show OHD (20%).&lt;/P&gt;&lt;P&gt;The trouble I am having is stopping the vOHD doing the dollar expansion and returning the result during the load.&amp;nbsp; Normally to avoid this I would do something like this:&amp;nbsp;&lt;SPAN&gt;'OHD (' &amp;amp; num($&lt;STRONG&gt;' &amp;amp; '&lt;/STRONG&gt; (vOHD),'0%') &amp;amp; ')' but I can't seem to get the correct combination to get the vOHD not to calculate too soon or not to calculate at all when enclosing the chart label in $().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;example of one of many failed syntax:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set x = 'OHDs (@ ' &amp;amp; num($'&amp;amp;'(vOHD),'0%') &amp;amp; ')';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please can you help?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514510#M601602</guid>
      <dc:creator>Deadpool</dc:creator>
      <dc:date>2024-11-16T05:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script variable dollar expansion help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514960#M601603</link>
      <description>&lt;P&gt;Not sure if I understand your issue correct. Is this what you want:&lt;/P&gt;&lt;P&gt;Not: set SEt_x = 'OHDs (@ ' &amp;amp; num($'&amp;amp;'(vOHD),'0%') &amp;amp; ')';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But: let let_x = 'OHDs '&amp;amp; $(vOHD)&amp;amp;' %';&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="2018-11-30 15_48_44-QlikView x64 - [D__QlikView_Uitzoekertjes_Community uitzoeken.qvw_].jpg" style="width: 200px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1380i1193C44E3788F38A/image-size/small?v=v2&amp;amp;px=200" role="button" title="2018-11-30 15_48_44-QlikView x64 - [D__QlikView_Uitzoekertjes_Community uitzoeken.qvw_].jpg" alt="2018-11-30 15_48_44-QlikView x64 - [D__QlikView_Uitzoekertjes_Community uitzoeken.qvw_].jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514960#M601603</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2018-11-30T14:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script variable dollar expansion help</title>
      <link>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514966#M601605</link>
      <description>&lt;P&gt;The easiest way would just be not to define these variables within the script else within the UI variable-editor. IMO there is not much benefit to do it within the script else it costs only efforts and is error-prone.&lt;/P&gt;&lt;P&gt;Should it be really within the script you need to replace the $ with anything else maybe with something in this way:&lt;/P&gt;&lt;P&gt;set x = "&lt;SPAN&gt;num(DOLLAR(vOHD),'0%')"&lt;/SPAN&gt;;&lt;BR /&gt;let x = replace('$(x)', 'DOLLAR', '$');&lt;/P&gt;&lt;P&gt;Another approach would be to read these variable-definitions from a file and then looping through the records and then assigning field-values to your variables.&lt;/P&gt;&lt;P&gt;But like above mentioned my first suggestion is the easiest way and you should have good reasons to take the extra costs for the script-approaches.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 15:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-variable-dollar-expansion-help/m-p/1514966#M601605</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-11-30T15:01:34Z</dc:date>
    </item>
  </channel>
</rss>

