<?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 toogle button Switch On/Of in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/toogle-button-Switch-On-Of/m-p/1606026#M14575</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get extention Switch On/Off, but i have a problema when i change application, because i can't take variable value, the value it's always the same.&lt;/P&gt;&lt;P&gt;controller: ["$scope", function($scope) {&lt;BR /&gt;function stringToBoolean(string) {&lt;BR /&gt;switch (string.toLowerCase()) {&lt;BR /&gt;case "true":&lt;BR /&gt;case "yes":&lt;BR /&gt;case "1":&lt;BR /&gt;return !0;&lt;BR /&gt;case "false":&lt;BR /&gt;case "no":&lt;BR /&gt;case "0":&lt;BR /&gt;case null:&lt;BR /&gt;return !1;&lt;BR /&gt;default:&lt;BR /&gt;return Boolean(string)&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;var app = qlik.currApp(),&lt;BR /&gt;varName = $scope.layout.props.varName;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var init = function(numTries) {&lt;BR /&gt;numTries || (numTries = 0), numTries &amp;gt; 2 || (numTries &amp;gt; 0 &amp;amp;&amp;amp; angular.noop(),&lt;/P&gt;&lt;P&gt;------When arrive here, the variable value always 0.-------&lt;BR /&gt;app.variable.getContent(varName).then(function(reply) {&lt;BR /&gt;$scope.isSelected = stringToBoolean(reply.qContent.qString)&lt;BR /&gt;})["catch"](function(error) {&lt;BR /&gt;numTries++, init(numTries)&lt;BR /&gt;}))&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;Tks for any help!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:10:29 GMT</pubDate>
    <dc:creator>Marcio</dc:creator>
    <dc:date>2024-11-16T05:10:29Z</dc:date>
    <item>
      <title>toogle button Switch On/Of</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/toogle-button-Switch-On-Of/m-p/1606026#M14575</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get extention Switch On/Off, but i have a problema when i change application, because i can't take variable value, the value it's always the same.&lt;/P&gt;&lt;P&gt;controller: ["$scope", function($scope) {&lt;BR /&gt;function stringToBoolean(string) {&lt;BR /&gt;switch (string.toLowerCase()) {&lt;BR /&gt;case "true":&lt;BR /&gt;case "yes":&lt;BR /&gt;case "1":&lt;BR /&gt;return !0;&lt;BR /&gt;case "false":&lt;BR /&gt;case "no":&lt;BR /&gt;case "0":&lt;BR /&gt;case null:&lt;BR /&gt;return !1;&lt;BR /&gt;default:&lt;BR /&gt;return Boolean(string)&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;var app = qlik.currApp(),&lt;BR /&gt;varName = $scope.layout.props.varName;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var init = function(numTries) {&lt;BR /&gt;numTries || (numTries = 0), numTries &amp;gt; 2 || (numTries &amp;gt; 0 &amp;amp;&amp;amp; angular.noop(),&lt;/P&gt;&lt;P&gt;------When arrive here, the variable value always 0.-------&lt;BR /&gt;app.variable.getContent(varName).then(function(reply) {&lt;BR /&gt;$scope.isSelected = stringToBoolean(reply.qContent.qString)&lt;BR /&gt;})["catch"](function(error) {&lt;BR /&gt;numTries++, init(numTries)&lt;BR /&gt;}))&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;Tks for any help!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/toogle-button-Switch-On-Of/m-p/1606026#M14575</guid>
      <dc:creator>Marcio</dc:creator>
      <dc:date>2024-11-16T05:10:29Z</dc:date>
    </item>
  </channel>
</rss>

