<?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: Passing Fields to Sub Issue (Like qvc project) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Passing-Fields-to-Sub-Issue-Like-qvc-project/m-p/322923#M707221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what I ended up doing to get this to work.&amp;nbsp; It feels clunky, but it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the macro that is creating the field list, I use ! instead of single quotes, then AFTER I pass the fields over to routine that is building the table I do a replace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Let _fieldsFinal = Replace('$(_fields)', '!', chr(39)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Build table from passed values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[$(_tableName)]:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(_fieldsFinal)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM $(_fileName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(txt, codepage is 1252, no labels, delimiter is '$(_delimiter)', header is $(headerLines) lines, msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has a better way, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 17:46:34 GMT</pubDate>
    <dc:creator>markmccoid</dc:creator>
    <dc:date>2012-02-27T17:46:34Z</dc:date>
    <item>
      <title>Passing Fields to Sub Issue (Like qvc project)</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-Fields-to-Sub-Issue-Like-qvc-project/m-p/322922#M707220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently downloaded Rob Wunderlich's QVC package and it inspired me to create a sub routine for a project I was working on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a routine that would accept a tablename, field names and a couple of other parameters so that I could automate the loading of external tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All works great until if I pass fields (stored in a variable) like "@1 as Feed2_Name, @2 as Feed2_Zipcode", but when I try to pass a variable that has the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;@1 as FEED2_NAME,&lt;/P&gt;&lt;P&gt;IF(Index(@2,'-')&amp;gt;0,mid(@6,1,index(@2,'-')-1), @2) as FEED2_ZIPCODE, &lt;/P&gt;&lt;P&gt;IF(Index(@2,'-')&amp;gt;0,mid(@6,index(@2,'-')+1,4)) as FEED2_ZIP4&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get problems because of the single quotes.&amp;nbsp; They come over as not double quotes, but two single quotes where there use to be one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Index(@2,''-'')...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, this is coming from a variable "vFeed2_Fields".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how I need to structure the information in the variable so this doesn't happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 15:25:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-Fields-to-Sub-Issue-Like-qvc-project/m-p/322922#M707220</guid>
      <dc:creator>markmccoid</dc:creator>
      <dc:date>2012-02-27T15:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Fields to Sub Issue (Like qvc project)</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-Fields-to-Sub-Issue-Like-qvc-project/m-p/322923#M707221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what I ended up doing to get this to work.&amp;nbsp; It feels clunky, but it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the macro that is creating the field list, I use ! instead of single quotes, then AFTER I pass the fields over to routine that is building the table I do a replace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Let _fieldsFinal = Replace('$(_fields)', '!', chr(39)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Build table from passed values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[$(_tableName)]:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$(_fieldsFinal)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM $(_fileName)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(txt, codepage is 1252, no labels, delimiter is '$(_delimiter)', header is $(headerLines) lines, msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has a better way, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 17:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-Fields-to-Sub-Issue-Like-qvc-project/m-p/322923#M707221</guid>
      <dc:creator>markmccoid</dc:creator>
      <dc:date>2012-02-27T17:46:34Z</dc:date>
    </item>
  </channel>
</rss>

