2 Replies Latest reply: Aug 31, 2013 3:03 AM by Christof Schwarz RSS

AJAX URL Selection Parameters - Select Literals

Benjamin Krywucki

We have a need to use literal selection parameters foropening QVW via AJAX.  For example, the test.qvw contains a List Box(LB01) that has the following values:

  • Current Sales
  • Current Sales Margin
  • Sales
  • Margin

 

Issuing the following url, http://localhost/QvAJAXZfc/opendoc.htm?document=test.qvw&host=Local&select=Document\LB01,Salespre-selects the following values (Current Sales, Current Sales Margin, CurrentSales Quota, Sales) regardless of the “Default Search Mode” specified withinthe List Box properties.

 

We need the behavior of this url to only select the singlevalue ‘Sales’.

 

Is this possible? 

  • AJAX URL Selection Parameters - Select Literals
    Benjamin Krywucki

    Per QlikView Support, this isn't supported.  I have submitted Idea -> http://community.qlik.com/ideas/1890

  • Re: AJAX URL Selection Parameters - Select Literals
    Christof Schwarz

    There is a simple workaround to select a distinct value in your example. It is correct, that "&select=Document\LB01,Sales" will select all values which contain the word "Sales" ... so something similar to *Sales*.

     

    Having said that, just create another Listbox (e.g. LB02) and put an expression instead of the field. If your values were in field "category", the formula would look like:

     

    If(Len(category), '|' & Replace(category,' ','|') & '|')

    This will turn your selection options into

    • |Current|Sales|
    • |Current|Sales|Margin|
    • |Sales|
    • |Margin|

     

    The undesired behavoir of "select where the word is contained" is no longer applicable, since there is no space in the options of that listbox and you may select explicitly one value with the querystring

    "&select=Document\LB02,|Sales|"

     

    regards