<?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 how to display table content based on content(variable) from ListBox in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/331999#M575771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list box with names to the columns of a Table (Table is System with Column Names(Version, platform,Source....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;//connect to the Database&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;Deliverables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;LOAD * inline&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;SWDeliverables //name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;Version&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Platform&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;OperatingSystem &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;//So now the listbox gets the values from TempSWDeliverables&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;TempSWDeliverables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;LOAD * RESIDENT Deliverables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;//Now I set the variable ﻿SWDeliverables=getFieldSelection(TempSWDeliverable) using the Document Properties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;tableSWDeliverables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT distinct '$(SWDeliverables)' AS SelectedSW, s.id as ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;FROM TableSystem s where s.id= 10;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;Load *RESIDENTtableSWDeliverables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My problem is&amp;nbsp; I am unable to display the table contents based on the selection .&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;﻿&lt;/SPAN&gt;Would appreciate any suggestions/ideas. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;﻿&lt;/SPAN&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2012 16:53:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-31T16:53:23Z</dc:date>
    <item>
      <title>how to display table content based on content(variable) from ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/331999#M575771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list box with names to the columns of a Table (Table is System with Column Names(Version, platform,Source....)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;//connect to the Database&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;Deliverables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;LOAD * inline&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;SWDeliverables //name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;Version&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Platform&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;OperatingSystem &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;//So now the listbox gets the values from TempSWDeliverables&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;TempSWDeliverables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;LOAD * RESIDENT Deliverables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;//Now I set the variable ﻿SWDeliverables=getFieldSelection(TempSWDeliverable) using the Document Properties&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;tableSWDeliverables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;SQL SELECT distinct '$(SWDeliverables)' AS SelectedSW, s.id as ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;FROM TableSystem s where s.id= 10;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;Load *RESIDENTtableSWDeliverables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My problem is&amp;nbsp; I am unable to display the table contents based on the selection .&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;﻿&lt;/SPAN&gt;Would appreciate any suggestions/ideas. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;﻿&lt;/SPAN&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 16:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/331999#M575771</guid>
      <dc:creator />
      <dc:date>2012-05-31T16:53:23Z</dc:date>
    </item>
    <item>
      <title>how to display table content based on content(variable) from ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/332000#M575772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Could somebody please suggest any solutions as I have to dynamically be able to run the Query and display the table contents AFTER i Have selected from the Listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since its dynamic and I have linked the variable to the Listbox --I am not able to display the table.&lt;/P&gt;&lt;P&gt;But if the variable is predefined as 'Version' then the SQL works. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 19:54:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/332000#M575772</guid>
      <dc:creator />
      <dc:date>2012-05-31T19:54:40Z</dc:date>
    </item>
    <item>
      <title>how to display table content based on content(variable) from ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/332001#M575773</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;You should not filter the data in Script initially, you should all the data.&amp;nbsp; Qlikview automatically filters data if you select any value in Listbox if there is mapping / link between the fields.&amp;nbsp; This is the default behaviour of Qlikview.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should not load the file everytime you select in Listbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you attach sample file and with detailed description of what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 08:20:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/332001#M575773</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-06-08T08:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to display table content based on content(variable) from ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/332002#M575774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for replying.&lt;/P&gt;&lt;P&gt;I finally was able to load the data the QlikView way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 tables for now and they are already connected thru keys in the Database.&lt;/P&gt;&lt;P&gt;Master has ID&lt;/P&gt;&lt;P&gt;System- is related to Master thru ID&lt;/P&gt;&lt;P&gt;BC- is also related to Master thru ID – The BC table has 1 record for each system while Master and System (both have same total number) can more than 1 record for the same system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I used:&lt;/P&gt;&lt;P&gt;Load * from master//not following the syntax(just for example)&lt;/P&gt;&lt;P&gt;Sql Select * from master;&lt;/P&gt;&lt;P&gt;Load * from system//not following the syntax(just for example)&lt;/P&gt;&lt;P&gt;Sql Select * from system;&lt;/P&gt;&lt;P&gt;Left join Load * from BC&lt;/P&gt;&lt;P&gt;Sql Select * from BC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I am right till here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now since I have the data loaded:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a multi-box that has all but 2(which is id, sys_id) the fields in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: I need to display a chart(ONLY ONE) which will chart out Field against the count(distinct (Master.serialNums))&lt;/P&gt;&lt;P&gt;Based on my selection of the mulitbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if my mulitbox has (Actually all I need is the names of the Field in the mulitbox- I don’t know how to get that only and no need for Values)&lt;/P&gt;&lt;P&gt;-Version&lt;/P&gt;&lt;P&gt;  5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;-ROM&lt;/P&gt;&lt;P&gt;2/5/2011&lt;/P&gt;&lt;P&gt;3/4/2012&lt;/P&gt;&lt;P&gt;-Operating System&lt;/P&gt;&lt;P&gt;  Windows Enterprise&lt;/P&gt;&lt;P&gt;Windows Standard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I select Version I should be able to plot in the chart:&lt;/P&gt;&lt;P&gt;Version against count(distinct (Master.serialNums))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same chart if I select something else :&lt;/P&gt;&lt;P&gt;ROM against count(distinct (Master.serialNums))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don’t know how to use the Variable here or trigger in this case.  Please find the attached jpg file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previously I used a variable that varSWDeliverables  and then had a sql statement for each selection that would query everytime the Dbase by using a Reload script using a trigger.&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;IF wildmatch('$(varSWDeliverables)', 'SYS_iLOVersion') THEN  // Only sheetNames that begin "Sales"&lt;/P&gt;&lt;P&gt;SYS_iLOVersion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL select distinct A.product as Product,A.SYS_iLOVersion as SWDeliverable,A.Supplier as Supplier,A.Source_ as Source,&lt;/P&gt;&lt;P&gt;        COUNT(A.Count) as Count,A.Year as Year,A.Week as Week&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;        (&lt;/P&gt;&lt;P&gt;        select s.sys_product as product,s.SYS_iLOVersion as SYS_iLOVersion,&lt;/P&gt;&lt;P&gt;        s.SYS_Source as Source_,b.BC_WWSiteName as Supplier,&lt;/P&gt;&lt;P&gt;        COUNT(distinct(m.AHS_SYSSerialNumber)) as Count,year(cast(b.BC_BuildTimestamp as Datetime)) as Year,&lt;/P&gt;&lt;P&gt;        datepart(week,cast(b.BC_BuildTimestamp as Datetime))as Week&lt;/P&gt;&lt;P&gt;        from “System" s, “MASTER" m&lt;/P&gt;&lt;P&gt;        left join "ahs_bc" b&lt;/P&gt;&lt;P&gt;        ON  m.ahs_id=b.ahs_id&lt;/P&gt;&lt;P&gt;        where m.AHS_ID=s.AHS_ID&lt;/P&gt;&lt;P&gt;        group by s.sys_product ,s.SYS_iLOVersion,s.SYS_Source,b.BC_WWSiteName,cast(b.BC_BuildTimestamp as Datetime)&lt;/P&gt;&lt;P&gt;        ) A&lt;/P&gt;&lt;P&gt;        group by A.product, A.SYS_iLOVersion,A.source_,A.Supplier, A.Year,A.Week&lt;/P&gt;&lt;P&gt;        order by A.Week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script to select the variable from the list box and reload the document:&lt;/P&gt;&lt;P&gt;Sub Test&lt;/P&gt;&lt;P&gt;   set doc = ActiveDocument&lt;/P&gt;&lt;P&gt;   set mySelections = doc.fields("SWDeliverables").GetSelectedValues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   for i = 0 to mySelections.Count - 1&lt;/P&gt;&lt;P&gt;        if len(trim(A)) = 0 then&lt;/P&gt;&lt;P&gt;           A= mySelections.Item(i).text&lt;/P&gt;&lt;P&gt;        else&lt;/P&gt;&lt;P&gt;           A= A  &amp;amp; "," &amp;amp; mySelections.Item(i).text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   next&lt;/P&gt;&lt;P&gt;   set v = ActiveDocument.Variables("varSWDeliverables")&lt;/P&gt;&lt;P&gt;   v.SetContent A ,true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ActiveDocument.Reload&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would appreciate any ideas or suggestions.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Neena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 14:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-display-table-content-based-on-content-variable-from/m-p/332002#M575774</guid>
      <dc:creator />
      <dc:date>2012-06-11T14:02:33Z</dc:date>
    </item>
  </channel>
</rss>

