<?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: Sub routine - passing field names in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593299#M596748</link>
    <description>&lt;P&gt;You should try to put ' ' around your parameter value 'CYFLAG'.&lt;/P&gt;&lt;P&gt;See the adjusted script below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sub Calc (vMeasure)

TEMP_Table1:
LOAD
 Field1
, Field2
WHERE [$(vMeasure)] = 1

END SUB

CALL CALC ('CYFlag');&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 18 Jun 2019 20:59:10 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-06-18T20:59:10Z</dc:date>
    <item>
      <title>Sub routine - passing field names</title>
      <link>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593274#M596747</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Hoping for some help on this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a chunk of code that I am repeating many times in my data model so I thought it would be perfect to move this to a sub routine with some parameters (as each run is slightly different).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I am having is that when I try to pass the a field name and use it in where clause I am getting '' instead of the field.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sub Calc (vMeasure)

TEMP_Table1:
LOAD
 Field1
, Field2
WHERE '$(vMeasure)' = 1

END SUB

CALL CALC (CYFlag);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in this quick example, I would get an error stating that '' =1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I specify the name of a field that exists in that table as part of the Call?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593274#M596747</guid>
      <dc:creator>cbushey1</dc:creator>
      <dc:date>2024-11-16T20:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sub routine - passing field names</title>
      <link>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593299#M596748</link>
      <description>&lt;P&gt;You should try to put ' ' around your parameter value 'CYFLAG'.&lt;/P&gt;&lt;P&gt;See the adjusted script below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sub Calc (vMeasure)

TEMP_Table1:
LOAD
 Field1
, Field2
WHERE [$(vMeasure)] = 1

END SUB

CALL CALC ('CYFlag');&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 Jun 2019 20:59:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593299#M596748</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-06-18T20:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sub routine - passing field names</title>
      <link>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593301#M596749</link>
      <description>&lt;P&gt;Thanks. I literally just figured that out and now it is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the post though!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 21:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sub-routine-passing-field-names/m-p/1593301#M596749</guid>
      <dc:creator>cbushey1</dc:creator>
      <dc:date>2019-06-18T21:05:58Z</dc:date>
    </item>
  </channel>
</rss>

