<?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 Function in Mashup to Clear All Selections in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/708435#M2210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a custom webpage on an IIS server with some mashup content plugged in. It is working fine. I need to add a button to allow the user to clear selections. The mashup API has a method called clearAll() &lt;A href="http://help.qlik.com/sense/en-US/developer/#../Subsystems/Workbench/Content/BuildingWebsites/API/Methods/MethodClearAll.htm"&gt;here&lt;/A&gt; which I should be able to use. However I am not sure how to implement this. The javascript file associated with my mashup is attached. an extract is below.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- I can see that the connection to the app is defined in the first block of code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- When I reference the app object in the second block it does not work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- I am guessing the second function needs to somehow be embedded into the first block, is that correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- I dont quite understand the requireJS syntax, so I am a little lost on h&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require( ["js/qlik"], function ( qlik ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; qlik.setOnError( function ( error ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; alert( error.message );&lt;/P&gt;&lt;P&gt;&amp;nbsp; } );&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; //callbacks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; //open app and get objects&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var app = qlik.openApp("Thread Bare Clothing Sales.qvf", config);&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(".qvobject").each(function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp; var qvid = $(this).data("qvid");&lt;/P&gt;&lt;P&gt;&amp;nbsp; app.getObject(this, qvid);&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*AUTOGEN START*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*AUTOGEN END*/&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;} );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function clearAll(){&lt;/P&gt;&lt;P&gt;&amp;nbsp; alert("start")&lt;/P&gt;&lt;P&gt;&amp;nbsp; app = qlik.currApp();&lt;/P&gt;&lt;P&gt;&amp;nbsp; app.clearAll();&lt;/P&gt;&lt;P&gt;&amp;nbsp; alert("end")&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Oct 2014 10:27:15 GMT</pubDate>
    <dc:creator>Lee_Matthews</dc:creator>
    <dc:date>2014-10-28T10:27:15Z</dc:date>
    <item>
      <title>Function in Mashup to Clear All Selections</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/708435#M2210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a custom webpage on an IIS server with some mashup content plugged in. It is working fine. I need to add a button to allow the user to clear selections. The mashup API has a method called clearAll() &lt;A href="http://help.qlik.com/sense/en-US/developer/#../Subsystems/Workbench/Content/BuildingWebsites/API/Methods/MethodClearAll.htm"&gt;here&lt;/A&gt; which I should be able to use. However I am not sure how to implement this. The javascript file associated with my mashup is attached. an extract is below.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- I can see that the connection to the app is defined in the first block of code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- When I reference the app object in the second block it does not work&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- I am guessing the second function needs to somehow be embedded into the first block, is that correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;- I dont quite understand the requireJS syntax, so I am a little lost on h&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require( ["js/qlik"], function ( qlik ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; qlik.setOnError( function ( error ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; alert( error.message );&lt;/P&gt;&lt;P&gt;&amp;nbsp; } );&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; //callbacks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; //open app and get objects&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var app = qlik.openApp("Thread Bare Clothing Sales.qvf", config);&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(".qvobject").each(function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp; var qvid = $(this).data("qvid");&lt;/P&gt;&lt;P&gt;&amp;nbsp; app.getObject(this, qvid);&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*AUTOGEN START*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*AUTOGEN END*/&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;} );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function clearAll(){&lt;/P&gt;&lt;P&gt;&amp;nbsp; alert("start")&lt;/P&gt;&lt;P&gt;&amp;nbsp; app = qlik.currApp();&lt;/P&gt;&lt;P&gt;&amp;nbsp; app.clearAll();&lt;/P&gt;&lt;P&gt;&amp;nbsp; alert("end")&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 10:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/708435#M2210</guid>
      <dc:creator>Lee_Matthews</dc:creator>
      <dc:date>2014-10-28T10:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Mashup to Clear All Selections</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/708436#M2211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;To anyone interested in the solution, one of my (very) esteemed colleagues suggested the following approach which worked perfectly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Add this to your HTML&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;lt;div id="ClearAll"&amp;gt;&amp;lt;button&amp;gt;Click me&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;And then add to the JavaScript what it should do when clicked (below in Red)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: Consolas; font-size: 10.5pt; line-height: 1.5em;"&gt;var config = {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host: window.location.hostname,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prefix: "/",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; port: window.location.port,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isSecure: window.location.protocol === "https:"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;require.config( {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseUrl: ( config.isSecure ? "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://"&gt;https://&lt;/A&gt;&lt;SPAN&gt;" : "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://"&gt;http://&lt;/A&gt;&lt;SPAN&gt;" ) + config.host + (config.port ? ":" + config.port: "") + config.prefix + "resources"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;} );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;require( ["js/qlik"], function ( qlik ) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qlik.setOnError( function ( error ) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt; alert( error.message );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //callbacks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //open app and get objects&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var app = qlik.openApp("Barcelona Basecamp.qvf", config);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt; $(".qvobject").each(function() {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt; var qvid = $(this).data("qvid");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt; app.getObject(this, qvid);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: red; font-size: 10.5pt; font-family: Consolas;"&gt;$("#ClearAll").click(function() {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-size: 10.5pt; font-family: Consolas;"&gt; app.clearAll();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; font-size: 10.5pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt; /*AUTOGEN START*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt; /*AUTOGEN END*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-size: 10.5pt; font-family: Consolas;"&gt;} )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 05:22:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/708436#M2211</guid>
      <dc:creator>Lee_Matthews</dc:creator>
      <dc:date>2014-10-29T05:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Mashup to Clear All Selections</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/1664105#M12113</link>
      <description>&lt;P&gt;Here&amp;nbsp;&lt;FONT color="#993300"&gt;app.clearAll(); will clear all the selections from the app..can we just limit the clear all to only few object s (Highlighted below)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//get objects -- inserted here --&lt;BR /&gt;&lt;STRONG&gt;app.getObject('QV7','nkqrQX');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;app.getObject('QV8','grjMbPe');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;app.getObject('QV9','ExJF');&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;app.getObject('QV00','e10b830b-dd35-49ee-9e12-9624f9888677');&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;qlik.theme.apply('next-gen-theme');&lt;BR /&gt;&lt;BR /&gt;//create cubes and lists -- inserted here --&lt;BR /&gt;&lt;BR /&gt;$("#ClearAll").click(function() {&lt;/P&gt;&lt;P&gt;&lt;FONT color="#993300"&gt;app.clearAll();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 13:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/1664105#M12113</guid>
      <dc:creator>BI_Dev</dc:creator>
      <dc:date>2020-01-09T13:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Mashup to Clear All Selections</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/1811958#M15021</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried both solution and didn't work for me, i need to make a clear button in mashup to clear all selections&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 07:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Function-in-Mashup-to-Clear-All-Selections/m-p/1811958#M15021</guid>
      <dc:creator>SN</dc:creator>
      <dc:date>2021-06-01T07:17:38Z</dc:date>
    </item>
  </channel>
</rss>

