<?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: Search function in a table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1511446#M36471</link>
    <description>&lt;P&gt;Ok, I have a solution.&lt;/P&gt;&lt;P&gt;The support said me : Unfortunately, we do not have an example or documentation to share for what you are trying to develop.&lt;/P&gt;&lt;P&gt;So I can't have the exact same search function, but I have developpe an other one:&lt;/P&gt;&lt;P&gt;I put an unique ID on my table, and a input type text before the table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var uniqueID = getUniqueID();
var input = &amp;lt;input class="inputText_7" type="text" placeholder="Search..."&amp;gt;, html = &amp;lt;table id="'+uniqueID+'" &amp;gt;;&lt;/PRE&gt;&lt;P&gt;The uniqueID was initialised by this function :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function getUniqueID(){
  var uniqueID = new Date();
  return uniqueID.getTime();
}&lt;/PRE&gt;&lt;P&gt;Then I just create my table, I print it, and I create a event:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$element.html( input+html );
$element.find('.inputText_7').on('keyup', function() {
  var filter = this.value.toUpperCase();
  searching(hypercube.qDataPages[0].qMatrix, filter, uniqueID);
});&lt;/PRE&gt;&lt;P&gt;And the more important function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	function searching (rows, inp, uniqueID) {
		var tr, td, i, tmp, table;
  		table = document.getElementById(uniqueID);
		tr = table.getElementsByTagName("tr");
  		for (i = 0; i &amp;lt; tr.length; i++) {
    		   td = tr[i].getElementsByTagName("td")[0];
    		   if (td) {
      			if (td.innerHTML.toUpperCase().indexOf(inp) &amp;gt; -1)
       		 		tr[i].style.display = "";
      			else tr[i].style.display = "none";
    		   }
  		}
	}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Nov 2018 09:28:57 GMT</pubDate>
    <dc:creator>erwanallain</dc:creator>
    <dc:date>2018-11-23T09:28:57Z</dc:date>
    <item>
      <title>Search function in a table</title>
      <link>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1510156#M36407</link>
      <description>&lt;P&gt;Hello, I develop a qlik sense extension (a table) and i want to know how I can put a the search function like the original table (see picture)&lt;BR /&gt;Thank.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:14:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1510156#M36407</guid>
      <dc:creator>erwanallain</dc:creator>
      <dc:date>2024-11-16T07:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Search function in a table</title>
      <link>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1510223#M36414</link>
      <description>You developed Qliksense Extension? There must be one more script to create search icon as well - That you have to find out? You may help which is that extension?</description>
      <pubDate>Wed, 21 Nov 2018 09:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1510223#M36414</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-11-21T09:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search function in a table</title>
      <link>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1510237#M36416</link>
      <description>&lt;P&gt;Hello, yes i think too they is a script or a API for use the search function in qlik sense, but i didn't find it. I didn't find other table extension who use this search function... This is why I ask to the Qlik community.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 10:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1510237#M36416</guid>
      <dc:creator>erwanallain</dc:creator>
      <dc:date>2018-11-21T10:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search function in a table</title>
      <link>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1511446#M36471</link>
      <description>&lt;P&gt;Ok, I have a solution.&lt;/P&gt;&lt;P&gt;The support said me : Unfortunately, we do not have an example or documentation to share for what you are trying to develop.&lt;/P&gt;&lt;P&gt;So I can't have the exact same search function, but I have developpe an other one:&lt;/P&gt;&lt;P&gt;I put an unique ID on my table, and a input type text before the table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var uniqueID = getUniqueID();
var input = &amp;lt;input class="inputText_7" type="text" placeholder="Search..."&amp;gt;, html = &amp;lt;table id="'+uniqueID+'" &amp;gt;;&lt;/PRE&gt;&lt;P&gt;The uniqueID was initialised by this function :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function getUniqueID(){
  var uniqueID = new Date();
  return uniqueID.getTime();
}&lt;/PRE&gt;&lt;P&gt;Then I just create my table, I print it, and I create a event:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$element.html( input+html );
$element.find('.inputText_7').on('keyup', function() {
  var filter = this.value.toUpperCase();
  searching(hypercube.qDataPages[0].qMatrix, filter, uniqueID);
});&lt;/PRE&gt;&lt;P&gt;And the more important function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	function searching (rows, inp, uniqueID) {
		var tr, td, i, tmp, table;
  		table = document.getElementById(uniqueID);
		tr = table.getElementsByTagName("tr");
  		for (i = 0; i &amp;lt; tr.length; i++) {
    		   td = tr[i].getElementsByTagName("td")[0];
    		   if (td) {
      			if (td.innerHTML.toUpperCase().indexOf(inp) &amp;gt; -1)
       		 		tr[i].style.display = "";
      			else tr[i].style.display = "none";
    		   }
  		}
	}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 09:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Search-function-in-a-table/m-p/1511446#M36471</guid>
      <dc:creator>erwanallain</dc:creator>
      <dc:date>2018-11-23T09:28:57Z</dc:date>
    </item>
  </channel>
</rss>

