3 Replies Latest reply: Oct 11, 2017 7:13 AM by Alexander Voss RSS

    Replace a String in Custom Connect To Statement in qlikview

    Sourav Das

      I am using a REST Connector in Qlikview and i need to pass a variable to the CUSTOM CONNECT TO Statement when connecting to a Web Service.


          CUSTOM CONNECT TO "Provider=QVRestConnector.exe;url="http://test.example.com?auth=2334342assa13"


      Now, instead of the auth token directly getting passed, i need to provide it at the RunTime. I tried the below but its not working.


          Let vToken="a3122423421f";


        • Re: Replace a String in Custom Connect To Statement in qlikview
          Peter Cammaert

          Should work. You may end up having conflicts with the (many) quotes enclosing the different parts. Does it work if you replace the outer double quotes with square brackets? Like in


          LET vToken = 'a3122423421f'; // Use single quotes


          CUSTOM CONNECT TO [Provider=QVRestConnector.exe;url="blablabla"...];





          • Re: Replace a String in Custom Connect To Statement in qlikview
            Alexander Voss

            so this really is an issue, also for me




            LET vAPIKey = 'XYZ';


            CUSTOM CONNECT TO "Provider=QvRestConnector.exe;













            this doesnt work but if I paste the key directly into the Connectionstring it works. But I need variables for dynamic requests.


            it seems like variables do not get proper resolved in the connection string. Anyone an idea why ? this only seems to affect the REST connector.


            If it is not any query parameter but a query header a possible workaround I found is using


            FROM JSON (wrap on) "root" PK "__KEY_root"

            WITH CONNECTION (

              HTTPHEADER "Authorization" "Bearer $(vAccessToken)"



            So adding the header to the JSON load instead of the Connectionstring but this seems to only work with complex request headers and doesn't work with pagination so it is very limited