- Implement two new methods in the class extending QvxServer
- Install the connector
New methods in class extending QvxServer
First, you must implement the Handling JSON request command method and handlers for any command you want to send to your connector from the web UI.
In the class extending QvxServer three handlers have been implemented for different calls. These allow a connector to use the standard select dialog. We have also implemented getInfo, which is used to send information to the connect dialog as well as creating an example for testConnection.
For an example look in the EventLogSimple connector inside the QvEventLogServer.cs file. The call handlers we have implemented are:
As an example we have provided the files needed for EventLogSimple to work with Qlik Sense and its standard select dialog. They can be found in a subfolder to the built connector named web\:
We have used AngularJS as the framework for building the dialogs and can with confidence recommend you to do the same.
It does not matter how you create your connect string. The only thing that is mandatory in connectdialog.js is that you call the createNewConnection function when you are done. This will create a new connection in the Qlik Sense Repository Service (QRS). The connection will be represented by a new connection in the connection panel on the right side of the script editor.
input.serverside.createNewConnection( $scope.name, $scope.connectionString, $scope.username, $scope.password);
When you create the connection string it needs to be in the following format:"CUSTOM CONNECT TO \"provider=QlikViewExpressorConnector.exe;" + response.connectionString + ";\""That is, CUSTOM CONNECT TO followed by a double quote, then the provider, then your custom parameters, and ended by a semicolon and a new double quote.
You will also need to support when the user has selected to edit the connection. The connect dialog will in this case be opened with the parameter input.editMode set to True, which enables you to adapt the dialog to edit mode. When you are done, you should call the input.serverside.modifyConnection function.
|If you want to use the standard Qlik Sense select dialog you have to implement all methods shown in this file. Each method is used to fetch different types of information about your data source and it will be presented in the select dialog when invoked.|
Installing the connector
You install connectors in the folder C:\Program Files (x86)\Common Files\Qlik\Custom Data\