<?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: Global variable or custom property to store value during extension paint function in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000625#M17487</link>
    <description>&lt;P&gt;You can use Qlik Sense variables for getting/setting values and then render variables' values into your extension input field.&lt;/P&gt;&lt;P&gt;For having a default value always rendered by your extension, create a variable in QlikSense with the default value and then render it into your input field.&lt;/P&gt;&lt;P&gt;You can use Engine API in extension code for getting/setting Qlik Sense variable values&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 11:08:27 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2022-11-04T11:08:27Z</dc:date>
    <item>
      <title>Global variable or custom property to store value during extension paint function</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000598#M17486</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm new to building extensions and I'm wondering in what way it would be possible to store a value from an input field, so that when the extension is rendered by the paint function, the value won't be overwritten/reset. Meaning, in what way can I create a global variable that will not be reset once the paint function is called? Or if it is possible to declare a custom initialProperty that I can set and get in the paint function?&lt;/P&gt;
&lt;P&gt;I've looked through some documentation but cannot seem to find a solution to my specific problem...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be greatly appreciated, and just let me know if further explanation is needed!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 10:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000598#M17486</guid>
      <dc:creator>johannaalmm</dc:creator>
      <dc:date>2022-11-04T10:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Global variable or custom property to store value during extension paint function</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000625#M17487</link>
      <description>&lt;P&gt;You can use Qlik Sense variables for getting/setting values and then render variables' values into your extension input field.&lt;/P&gt;&lt;P&gt;For having a default value always rendered by your extension, create a variable in QlikSense with the default value and then render it into your input field.&lt;/P&gt;&lt;P&gt;You can use Engine API in extension code for getting/setting Qlik Sense variable values&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 11:08:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000625#M17487</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-04T11:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Global variable or custom property to store value during extension paint function</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000922#M17498</link>
      <description>&lt;P&gt;Is this the documentation you're refering to:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2022/Subsystems/EngineAPI/Content/Sense_EngineAPI/introducing-engine-API.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/August2022/Subsystems/EngineAPI/Content/Sense_EngineAPI/introducing-engine-API.htm&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 12:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2000922#M17498</guid>
      <dc:creator>johannaalmm</dc:creator>
      <dc:date>2022-11-05T12:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Global variable or custom property to store value during extension paint function</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2001155#M17501</link>
      <description>&lt;P&gt;Yes I'm referring to that.&lt;/P&gt;&lt;P&gt;More specifically, inside your extension code you can access to Engine API starting from &lt;EM&gt;qlik&lt;/EM&gt; object:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First you have to wait for the promise from Engine API for understanding if Engine APIs are ready&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;await qlik.currApp().model.enigmaModel.waitForOpen&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Then you can access all Engine APIs methods, for you scenario you can get your variables by ID or Name. For getting by name there is another method &lt;EM&gt;getVariableByName&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;await qlik.currApp().model.enigmaModel.getVariableById('_yourVariableId_')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set a variable value as string (setStringValue) or number (setNumValue)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const variable = await qlik.currApp().model.enigmaModel.getVariableById('_yourVariableId_');
await variable.setStringValue('test')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use Capability APIs for doing the same thing (&lt;A href="https://help.qlik.com/en-US/sense-developer/August2022/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VariableAPI/getContent-variable-method.htm" target="_self"&gt;here&lt;/A&gt; the get content and &lt;A href="https://help.qlik.com/en-US/sense-developer/August2022/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VariableAPI/setStringValue-variable-method.htm" target="_self"&gt;here&lt;/A&gt; to set a content) but with Engine APIs will work for both Capability and nebula.js approach.&lt;/P&gt;&lt;P&gt;As reference below Engine APIs documentation for methods mentioned above&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2022/Subsystems/EngineJSONAPI/Content/service-doc-getvariablebyid.htm" target="_blank" rel="noopener"&gt;GetVariableById&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/August2022/Subsystems/EngineJSONAPI/Content/service-genericvariable-setstringvalue.htm" target="_self"&gt;SetStringValue&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 10:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Global-variable-or-custom-property-to-store-value-during/m-p/2001155#M17501</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-07T10:52:31Z</dc:date>
    </item>
  </channel>
</rss>

