<?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: Dynamic REST connection to Service Now in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Dynamic-REST-connection-to-Service-Now/m-p/1733785#M5325</link>
    <description>&lt;P&gt;I got the solution in stackoverflow and wanted to post it in here in case someone else runs on the same situation.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The&amp;nbsp;WITH CONNECTION&amp;nbsp;part can alter some parameters of the connection but not all of them. The http parameters can be changed there like: the url, headers, query parameters and the body. You cant change the rest like: the method (get or post), timeout, http protocol etc. These properties are connection specific and they have to be updated on connection level (when manually editing an connection or updating it via Repository API)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Have a look at the documentation about the&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword" target="_blank" rel="nofollow noopener noreferrer"&gt;WITH CONNECTION&lt;/A&gt;&amp;nbsp;keyword&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;btw the&amp;nbsp;QUERY&amp;nbsp;command will just add a query parameter in the url before sending the request. And thats why you are not getting any data. For example&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;let vURL = 'http://example.com'

RestConnectorMasterTable:
SQL SELECT 
    ...my fields to query from Service NOW...
FROM JSON (wrap off) "result" PK "__KEY_result"
WITH CONNECTION (
URL "$(vURL)",
QUERY "type" "XML",
QUERY "subtype" "text"
);&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;will alter the url before sending it and the actual url will be&amp;nbsp;&lt;A href="http://example.com?type=XML&amp;amp;subtype=text" target="_blank" rel="noopener"&gt;http://example.com?type=XML&amp;amp;subtype=text&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;you can (should?) split each query param like this:&amp;nbsp;QUERY "definition" "Gavel Sub-State Duration", QUERY "sysparm_fields" "id,sys_id,start,end,value,definition", QUERY "1sysparm_display_value" "false"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the link for more&amp;nbsp; reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/63175850/dynamic-rest-connection-to-service-now-in-qlik-sense" target="_self"&gt;https://stackoverflow.com/questions/63175850/dynamic-rest-connection-to-service-now-in-qlik-sense&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 14:29:37 GMT</pubDate>
    <dc:creator>Ilhui</dc:creator>
    <dc:date>2020-08-06T14:29:37Z</dc:date>
    <item>
      <title>Dynamic REST connection to Service Now</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Dynamic-REST-connection-to-Service-Now/m-p/1731536#M5298</link>
      <description>&lt;P&gt;I'm trying to unify all the REST connections created in QlikSense to ServiceNow since I have to create a new connection every time I pull out data from a new table. This will make difficult to manage all my connections in the future and because of that I'm trying to have only one connection that will override specific parameters depending on the required table by using the "WITH CONNECTION" function.&lt;/P&gt;&lt;P&gt;I tried passing the parameters like what's on the code below but after loading the data there's nothing in the table:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vURL = "https://mydomain.com/.../.../.../nameofthetable?";

RestConnectorMasterTable:
SQL SELECT 
	...my fields to query from Service NOW...
FROM JSON (wrap off) "result" PK "__KEY_result"
WITH CONNECTION (
URL "$(vURL)",
QUERY "timeout" "900",
QUERY "method" "GET",
QUERY "httpProtocol" "1.1",
QUERY "isKeepAlive" "true",
QUERY "bodyEncoding" "UTF-8",
QUERY "sendExpect100Continue" "true",
QUERY "autoDetectResponseType" "true",
QUERY "queryParameters" "sysparm_query%2u_stateINin_progress,Closed,New%1sysparm_fields%2sys_created_by,%1sysparm_display_value%2true",
QUERY "addMissingQueryParametersToFinalRequest" "false",
QUERY "PaginationType" "Offset",
QUERY "OffsetStartField" "sysparm_offset",
QUERY "IsOffsetStartFieldHeader" "false",
QUERY "OffsetStartFieldValue" "0",
QUERY "OffsetCountFieldName" "sysparm_limit",
QUERY "IsOffsetCountFieldHeader" "false",
QUERY "OffsetCountValue" "10000",
QUERY "OffsetTotalPath" "X-Total-Count",
QUERY "IsOffsetTotalPathHeader" "true",
QUERY "allowResponseHeaders" "false",
QUERY "allowHttpsOnly" "true",
QUERY "useProxy" "false",
QUERY "proxyBypassOnLocal" "false",
QUERY "proxyUseDefaultCredentials" "true"
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got no error but I don't know if that's the correct syntax to load data or even if this is the right approach I should be using.&lt;/P&gt;&lt;P&gt;I have seen some other people posted similar questions to this but none of them explained in detail how did they solved it.&lt;/P&gt;&lt;P&gt;Can anyone help me on this:&lt;/P&gt;&lt;P&gt;References:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Dynamically-load-and-fill-variables-from-a-table-through-a-loop/td-p/1528506" target="_blank" rel="noopener"&gt;1.- https://community.qlik.com/t5/New-to-QlikView/Dynamically-load-and-fill-variables-from-a-table-through-a-loop/td-p/1528506&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-App-Development/REST-Connector-WITH-CONNECTION-Syntax/td-p/1314" target="_blank" rel="noopener"&gt;2.- https://community.qlik.com/t5/Qlik-Sense-App-Development/REST-Connector-WITH-CONNECTION-Syntax/td-p/1314&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword" target="_blank" rel="noopener"&gt;3.- https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Data-Connectivity/Passing-a-parameter-to-REST-connector-URL/m-p/60932#M357" target="_blank" rel="noopener"&gt;4.- https://community.qlik.com/t5/Qlik-Sense-Data-Connectivity/Passing-a-parameter-to-REST-connector-URL/m-p/60932#M357&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Data-Connectivity/REST-API-Connector-Multi-table/td-p/1261353" target="_blank" rel="noopener"&gt;5.- https://community.qlik.com/t5/Qlik-Sense-Data-Connectivity/REST-API-Connector-Multi-table/td-p/1261353&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 19:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Dynamic-REST-connection-to-Service-Now/m-p/1731536#M5298</guid>
      <dc:creator>Ilhui</dc:creator>
      <dc:date>2021-12-28T19:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic REST connection to Service Now</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Dynamic-REST-connection-to-Service-Now/m-p/1733785#M5325</link>
      <description>&lt;P&gt;I got the solution in stackoverflow and wanted to post it in here in case someone else runs on the same situation.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The&amp;nbsp;WITH CONNECTION&amp;nbsp;part can alter some parameters of the connection but not all of them. The http parameters can be changed there like: the url, headers, query parameters and the body. You cant change the rest like: the method (get or post), timeout, http protocol etc. These properties are connection specific and they have to be updated on connection level (when manually editing an connection or updating it via Repository API)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Have a look at the documentation about the&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Load-REST-data/Load-data.htm#WITH-CONNECTION-keyword" target="_blank" rel="nofollow noopener noreferrer"&gt;WITH CONNECTION&lt;/A&gt;&amp;nbsp;keyword&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;btw the&amp;nbsp;QUERY&amp;nbsp;command will just add a query parameter in the url before sending the request. And thats why you are not getting any data. For example&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;let vURL = 'http://example.com'

RestConnectorMasterTable:
SQL SELECT 
    ...my fields to query from Service NOW...
FROM JSON (wrap off) "result" PK "__KEY_result"
WITH CONNECTION (
URL "$(vURL)",
QUERY "type" "XML",
QUERY "subtype" "text"
);&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;will alter the url before sending it and the actual url will be&amp;nbsp;&lt;A href="http://example.com?type=XML&amp;amp;subtype=text" target="_blank" rel="noopener"&gt;http://example.com?type=XML&amp;amp;subtype=text&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;you can (should?) split each query param like this:&amp;nbsp;QUERY "definition" "Gavel Sub-State Duration", QUERY "sysparm_fields" "id,sys_id,start,end,value,definition", QUERY "1sysparm_display_value" "false"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the link for more&amp;nbsp; reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/63175850/dynamic-rest-connection-to-service-now-in-qlik-sense" target="_self"&gt;https://stackoverflow.com/questions/63175850/dynamic-rest-connection-to-service-now-in-qlik-sense&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 14:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Dynamic-REST-connection-to-Service-Now/m-p/1733785#M5325</guid>
      <dc:creator>Ilhui</dc:creator>
      <dc:date>2020-08-06T14:29:37Z</dc:date>
    </item>
  </channel>
</rss>

