<?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 a variable for field selection in a URL? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304265#M112460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well my current issue is getting to that url string.&amp;nbsp; I am basically looking for a way to access it, and have not been able to yet.&amp;nbsp; Once I have that string, parsing it shouldnt be too much of an issue.&amp;nbsp; Anyone know how to get it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jun 2011 21:28:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-21T21:28:13Z</dc:date>
    <item>
      <title>How to pass a variable for field selection in a URL?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304262#M112457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am struggling to pass a variable in a URL.&amp;nbsp; I would like a value in the url to select the value in a field.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example URL: &lt;A href="http://qlikviewdev/QvAJAXZfc/opendoc.htm?document=public/CSD/Tyler/FeaturesbyPart.qvw&amp;amp;host=QVS@svr-orw-qlv-90&amp;amp;partnum=1480A"&gt;http://qlikviewdev/QvAJAXZfc/opendoc.htm?document=public/report.qvw&amp;amp;host=QVS@svr&amp;amp;partnbr=12&lt;/A&gt;34 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In my script I set two variables: &lt;/P&gt;&lt;P&gt;SET partnum=0;&lt;/P&gt;&lt;P&gt;SET partnbr=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I setup a simple macro that I hoped would get the partnbr from the url.&amp;nbsp; Here is the macro VB script that runs:&lt;/P&gt;&lt;P&gt;sub test&lt;/P&gt;&lt;P&gt;set partnum = ActiveDocument.GetVariable("partnbr")&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("PART_NBR").Select partnum.GetContent.String&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run this macro on a button press, unfortuanitally it does not work.&amp;nbsp; Can anyone help explain what I am missing, or how I should be going about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 00:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304262#M112457</guid>
      <dc:creator />
      <dc:date>2011-06-21T00:40:23Z</dc:date>
    </item>
    <item>
      <title>How to pass a variable for field selection in a URL?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304263#M112458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have also attempted to accomplish this through Jscript which has also failed.&amp;nbsp; Example functions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//this function grabs the params from the url&lt;/P&gt;&lt;P&gt;function gup( name )&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");&lt;/P&gt;&lt;P&gt;&amp;nbsp; var regexS = "[\\?&amp;amp;]"+name+"=([^&amp;amp;#]*)";&lt;/P&gt;&lt;P&gt;&amp;nbsp; var regex = new RegExp( regexS );&lt;/P&gt;&lt;P&gt;&amp;nbsp; try{&lt;/P&gt;&lt;P&gt;&amp;nbsp; var results = regex.exec( window.location.href );&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; catch(err)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&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;return err;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if( results == null )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; return "Got Nothing From Params";&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return results[1];&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever I run this I get an error about the window object... can the window.location object not be used?&amp;nbsp; Anyone have any success getting at url params from JScript?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 20:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304263#M112458</guid>
      <dc:creator />
      <dc:date>2011-06-21T20:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a variable for field selection in a URL?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304264#M112459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although it's not the most elegant solution, and its useness will depend on whether you know the name of the field you want to extract from the URL, you can use something like the following in your script:&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;&lt;SPAN&gt;Set vURL = &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://qlikviewdev/QvAJAXZfc/opendoc.htm?document=public/report.qvw&amp;amp;host=QVS@svr&amp;amp;partnbr=1234;"&gt;http://qlikviewdev/QvAJAXZfc/opendoc.htm?document=public/report.qvw&amp;amp;host=QVS@svr&amp;amp;partnbr=1234;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set eXtract = TextBetween($1, $2, '');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vPartnbr = $(eXtract('$(vURL)', 'partnbr='));&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.grupocomex.com"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 21:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304264#M112459</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-21T21:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a variable for field selection in a URL?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304265#M112460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well my current issue is getting to that url string.&amp;nbsp; I am basically looking for a way to access it, and have not been able to yet.&amp;nbsp; Once I have that string, parsing it shouldnt be too much of an issue.&amp;nbsp; Anyone know how to get it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 21:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304265#M112460</guid>
      <dc:creator />
      <dc:date>2011-06-21T21:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a variable for field selection in a URL?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304266#M112461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I have restructured my discussion here: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/thread/30326"&gt;http://community.qlik.com/thread/30326&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 22:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304266#M112461</guid>
      <dc:creator />
      <dc:date>2011-06-21T22:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a variable for field selection in a URL?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304267#M112462</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;&lt;SPAN&gt;Anybody who ended up at this thread pls refer to my comments @ &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/133891#133891"&gt;http://community.qlik.com/message/133891#133891&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 03:20:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-pass-a-variable-for-field-selection-in-a-URL/m-p/304267#M112462</guid>
      <dc:creator />
      <dc:date>2011-07-20T03:20:02Z</dc:date>
    </item>
  </channel>
</rss>

