<?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: QvxSDK, how to pass state in QvConnection (MParameters is null) in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829314#M2784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply. It works.&lt;/P&gt;&lt;P&gt;As you said. I built everything in HandleJsonRequest method + additional creation of MTables during Initializing QvConnection when Load Button is pressed (only when MParameters are not null).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 10:58:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-13T10:58:47Z</dc:date>
    <item>
      <title>QvxSDK, how to pass state in QvConnection (MParameters is null)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829310#M2780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;I am creating a custom connector for &lt;STRONG&gt;QlikSense&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;I have a problem with passing &lt;/SPAN&gt;&lt;STRONG style="color: red; font-size: 10.0pt; font-family: 'Verdana',sans-serif;"&gt;state&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;(username, password) in &lt;STRONG&gt;QvConnection&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;I can see state in &lt;STRONG&gt;connectiondialog&lt;/STRONG&gt;.js/&lt;STRONG&gt;connectiondialog.ng.html&lt;/STRONG&gt; as I read that like here:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;string username, password;&lt;/EM&gt;&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;EM style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;connection.MParameters.TryGetValue("userid", out username);&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;connection.MParameters.TryGetValue("password", out password);&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;and it works when I have that first &lt;STRONG&gt;connectiondialog&lt;/STRONG&gt;. However, I &lt;STRONG&gt;MParameters&lt;/STRONG&gt; is null when I open the second build-in popup window in QlikSense for selecting tables/db/owner etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;When that window is opened I don’t have any possibility to keep the state about username and password.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #1f4e79; font-size: 10.0pt; font-family: 'Verdana',sans-serif;"&gt;MParameters&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt; in &lt;STRONG&gt;QvConnection&lt;/STRONG&gt; is &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #c00000;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Do you know how can I use &lt;STRONG&gt;MParameters&lt;/STRONG&gt; to get the information about username and password when I open QS build-in dialog for selecting data (database/owner/tables etc.)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Can I use &lt;STRONG&gt;args&lt;/STRONG&gt; from main entry point to pass some values somehow? Is there any way to use &lt;STRONG&gt;args&lt;/STRONG&gt; in streaming mode with my customized params or username and password?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Your help will be be very appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2015 09:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829310#M2780</guid>
      <dc:creator />
      <dc:date>2015-07-08T09:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: QvxSDK, how to pass state in QvConnection (MParameters is null)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829311#M2781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you build your connection string are you creating it against the app? &lt;SPAN style="font-size: 13.3333330154419px;"&gt;It could be that the connection string has not been saved or not been setup correctly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you use the createNewConnection() method (example below) it should use the parameters in both your QvxConnection.cs and QvxServer.cs files so when using the sendJsonRequest method, as an example, or reloading, MParameters should be populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: 'Lucida Console', Monaco, monospace; font-size: 10.6666669845581px;"&gt;input.serverside.&lt;/SPAN&gt;&lt;SPAN class="SearchHighlight SearchHighlight1" style="color: #444444; font-family: 'Lucida Console', Monaco, monospace; font-size: 10.6666669845581px; background-position: no-repeat;"&gt;createNewConnection&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: 'Lucida Console', Monaco, monospace; font-size: 10.6666669845581px;"&gt;( $scope.name, $scope.connectionString, $scope.username,$scope.password);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;where $scope.connectionString should look something like this -&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="color: #444444; font-family: 'Lucida Console', Monaco, monospace; font-size: 10.6666669845581px; font-style: italic;"&gt;"CUSTOM CONNECT TO \"provider=QlikViewExpressorConnector.exe; myCustomParam="myParam";\""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I hope that helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Nick&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 13:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829311#M2781</guid>
      <dc:creator />
      <dc:date>2015-07-09T13:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: QvxSDK, how to pass state in QvConnection (MParameters is null)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829312#M2782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/37928"&gt;nwr&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Helvetica',sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Thanks for your help, but I think the problem is not related to the configuration of connection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;I am setting up the connection string as it was done in QvxSDK_2.1x64 examples. It means, I use just standard code in &lt;STRONG&gt;connectdialog.js&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;I checked the workflow in debug mode very carefully and it works like that:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;When I open my custom connector I am seeing &lt;STRONG&gt;connectdialog.ng.html&lt;/STRONG&gt; window for typing credentials. At that stage everything is fine. When I press “Create a new connection” (&lt;EM&gt;onOKClicked()&lt;/EM&gt;) button I can see that &lt;STRONG&gt;MParameters&lt;/STRONG&gt; is &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #00b050;"&gt;populated &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;in my &lt;STRONG&gt;QvXXXConnection, &lt;/STRONG&gt;which is fine&lt;STRONG&gt;. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;However, at the moment of clicking “Select Data” &lt;STRONG&gt;MParameters&lt;/STRONG&gt; is null in &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM style="color: #1f4e79; font-size: 10.0pt; font-family: 'Verdana',sans-serif;"&gt;public override void Init()&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;method but populated in &lt;EM&gt;HandleJsonRequest&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;The second method:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM style="color: #1f4e79; font-size: 10.0pt; font-family: 'Verdana',sans-serif;"&gt;public override string HandleJsonRequest(string method, string[] userParameters, QvxConnection connection)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;is called later and then I have &lt;STRONG&gt;MParameters&lt;/STRONG&gt; but it is too late because I don’t have information about &lt;STRONG&gt;state&lt;/STRONG&gt; to initialize connection and set up &lt;STRONG&gt;MTables&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;I am able to provide more details if requested, but I think, it is impossible for now to use &lt;STRONG&gt;state&lt;/STRONG&gt; in &lt;STRONG&gt;Init&lt;/STRONG&gt; method for &lt;STRONG&gt;QvXXXConnection&lt;/STRONG&gt; : &lt;STRONG&gt;QvConnection&lt;/STRONG&gt; class&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Summary:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: #1f4e79; font-size: 10.0pt; font-family: 'Verdana',sans-serif;"&gt;MParameters&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt; is null in &lt;STRONG&gt;Init&lt;/STRONG&gt; method but populated in &lt;STRONG&gt;HandleJsonRequest &lt;/STRONG&gt;at later stage. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Do you know if there is any way to read the state in &lt;STRONG&gt;Init&lt;/STRONG&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif; color: #1f4e79;"&gt;Your help would be much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 09:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829312#M2782</guid>
      <dc:creator />
      <dc:date>2015-07-10T09:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: QvxSDK, how to pass state in QvConnection (MParameters is null)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829313#M2783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the behaviour you describe is 'working as designed' so to speak. The MParameters info is only available within the QvxConnection class when reloading as far as I know. When setting up the connection and selecting data I tend to push everything to the HandleJsonRequest method, the only downside being that there is no persistence in the connection. By that I mean you can't connect to a source in your QvxServer.cs and keep that connection open and reuse it. With each HandleJsonRequest you'll need to reconnect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 11:10:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829313#M2783</guid>
      <dc:creator />
      <dc:date>2015-07-24T11:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: QvxSDK, how to pass state in QvConnection (MParameters is null)</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829314#M2784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply. It works.&lt;/P&gt;&lt;P&gt;As you said. I built everything in HandleJsonRequest method + additional creation of MTables during Initializing QvConnection when Load Button is pressed (only when MParameters are not null).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 10:58:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QvxSDK-how-to-pass-state-in-QvConnection-MParameters-is-null/m-p/829314#M2784</guid>
      <dc:creator />
      <dc:date>2015-08-13T10:58:47Z</dc:date>
    </item>
  </channel>
</rss>

