<?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: Query Portal Tables only in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141371#M7744</link>
    <description>It takes almost 10 second so initiate the geodatabase from the uri and in&lt;BR /&gt;my configuration I need information from these tables right away on&lt;BR /&gt;loading. I can’t seem to access the geodatabase until the Loaded stage of&lt;BR /&gt;the configuration manager. At that point I then have to wait until the&lt;BR /&gt;thread for the geodatabase returns some results. Since I have to load that&lt;BR /&gt;gdb at that point and not before application_loaded I am trying to find a&lt;BR /&gt;way to get some results with a synchronous web call. Unless you can think&lt;BR /&gt;of a way around this so that I can access the gdb before the loaded event.&lt;BR /&gt;</description>
    <pubDate>Mon, 07 Feb 2022 21:20:51 GMT</pubDate>
    <dc:creator>MKa</dc:creator>
    <dc:date>2022-02-07T21:20:51Z</dc:date>
    <item>
      <title>Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140873#M7730</link>
      <description>&lt;P&gt;I am looking to query static table data from my portal at the start of my application.&amp;nbsp; I don't want to add the data to my map, just get the information from this table to store in memory.&amp;nbsp; I know how to add these tables to my map, but I really just want to use them as an api for information.&amp;nbsp; I almost want to simply use them as a webapi of sorts to query information from them when i need it.&amp;nbsp; I want to hide these table from our users.&amp;nbsp; I am thinking i need to somehow query against them using my portal credentials and a properly formated URL.&amp;nbsp; But can seem to get it right.&amp;nbsp; In catalog here is what my tables and layers that I want to query against look like.&amp;nbsp; Could someone point me in the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MKa_0-1643997768146.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33167iD03931633162A1D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MKa_0-1643997768146.png" alt="MKa_0-1643997768146.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 18:03:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140873#M7730</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2022-02-04T18:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140881#M7731</link>
      <description>&lt;P&gt;Hi MKa,&lt;/P&gt;&lt;P&gt;I assume these portal tables are part of a feature service, right?&lt;/P&gt;&lt;P&gt;Start by creating a connection to the feature service, and then creating a Geodatabase from that connection. You can accomplish this by creating a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic7643.html" target="_self"&gt;ServiceConnectionProperties&lt;/A&gt; object, and then using the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic15000.html" target="_self"&gt;Geodatabase(ServiceConnectionProperties) constructor&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Once you have a Geodatabase, you can open tables and query using OpenDataset and Search.&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 18:14:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140881#M7731</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2022-02-04T18:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140901#M7732</link>
      <description>That is exactly what I am trying to accomplish. I was wondering if&lt;BR /&gt;the OpenQueryTable option might be what I am looking for over OpenDataset?&lt;BR /&gt;This table represents my worldwide locations, so at any given time, 95% of&lt;BR /&gt;this table is unneeded. Much like when i load a layer a set a definition&lt;BR /&gt;query. Would the QueryTableDescription improve performance here, in that&lt;BR /&gt;the number of results would be far smaller than the OpenDataset.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Feb 2022 19:13:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140901#M7732</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2022-02-04T19:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140919#M7734</link>
      <description>&lt;P&gt;Calling OpenDataset does not download the contents of the table- just some metadata about the table definition. &amp;nbsp;The only data that is downloaded are the rows specified by the QueryFilter in Table.Search.&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 20:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1140919#M7734</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2022-02-04T20:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141062#M7740</link>
      <description>Is there anyway to query the table in code much like we can do in postman&lt;BR /&gt;with a token. But instead use the portal credentials? So in postman I can&lt;BR /&gt;query my table like this with a token&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://MYURL/arcgis/sharing/servers/MyServer/rest/services/Company/CompanyWebService/FeatureServer/7/query?where=Code='TTT1" target="_blank"&gt;https://MYURL/arcgis/sharing/servers/MyServer/rest/services/Company/CompanyWebService/FeatureServer/7/query?where=Code='TTT1&lt;/A&gt;'&lt;BR /&gt;and GroupCode=099&amp;amp;outFields=*&amp;amp;f=pjson&amp;amp;token=TOKENFROM_AOL&lt;BR /&gt;&lt;BR /&gt;This returns my results using the TOKEN, but in the above I can specify the&lt;BR /&gt;query in the initial call. Would this save me time in getting the&lt;BR /&gt;information I want at my Configuration startup, or is getting this Table&lt;BR /&gt;using my portal instance still the best option. Could this HttpRequest use&lt;BR /&gt;my logged in portal credentials instead of the Token?&lt;BR /&gt;</description>
      <pubDate>Sun, 06 Feb 2022 16:17:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141062#M7740</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2022-02-06T16:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141236#M7742</link>
      <description>&lt;P&gt;It's always possible to access Esri REST services such as the feature service outside of the Pro SDK. I'm not familiar with the benefits of that solution, although the integration with Pro would obviously be harder.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 16:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141236#M7742</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2022-02-07T16:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141371#M7744</link>
      <description>It takes almost 10 second so initiate the geodatabase from the uri and in&lt;BR /&gt;my configuration I need information from these tables right away on&lt;BR /&gt;loading. I can’t seem to access the geodatabase until the Loaded stage of&lt;BR /&gt;the configuration manager. At that point I then have to wait until the&lt;BR /&gt;thread for the geodatabase returns some results. Since I have to load that&lt;BR /&gt;gdb at that point and not before application_loaded I am trying to find a&lt;BR /&gt;way to get some results with a synchronous web call. Unless you can think&lt;BR /&gt;of a way around this so that I can access the gdb before the loaded event.&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Feb 2022 21:20:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141371#M7744</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2022-02-07T21:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141724#M7748</link>
      <description>&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;I am not trying to do a simple EsriHttpClient query after I verify that my Portal is up and I am signed in.&amp;nbsp; I have tried every variation of the query using the EsriHttpCient and I cannot get the query to work.&amp;nbsp; Has anyone else ever run into this or tried to return results in code?&amp;nbsp; I keep getting the 400 error&lt;/P&gt;&lt;P&gt;"{\"error\":{\"code\":400,\"message\":\"Unable to complete operation.\",\"details\":[\"Unable to perform query operation.\"]}}".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my latest.&amp;nbsp; I have tried breaking this up in everyway and this works in postman with a token, but in my code I don't need the token because I am using the EsriHttpClient&lt;/P&gt;&lt;P&gt;EsriHttpClient client = new EsriHttpClient();&lt;/P&gt;&lt;P&gt;string path = "&lt;A href="https://MYServer/arcgis/sharing/servers/59621f9802e04755b9a872c25fcfb7ef/rest/services/MyWebService/FeatureServer/7/" target="_blank"&gt;https://MYServer/arcgis/sharing/servers/59621f9802e04755b9a872c25fcfb7ef/rest/services/MyWebService/FeatureServer/7/&lt;/A&gt;";&lt;BR /&gt;string query = string.Format("query?{0}&amp;amp;f=json&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnIdsOnly=false", "where=PlantCode='ABC1' and Code='010'");&lt;BR /&gt;EsriHttpResponseMessage searchResponse = client.Get(path + query);&lt;BR /&gt;HttpContent content = searchResponse.Content;&lt;/P&gt;&lt;P&gt;string response = await content.ReadAsStringAsync();&lt;BR /&gt;dynamic resultItems = JObject.Parse(response);&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 18:07:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1141724#M7748</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2022-02-08T18:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Query Portal Tables only</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1142776#M7758</link>
      <description>&lt;P&gt;I have been using fiddler and it looks like the EsriHttpClient is doing something to my above where clause&lt;/P&gt;&lt;P&gt;THIS code from above&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;string query = string.Format("query?{0}&amp;amp;f=json&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnIdsOnly=false", "where=PlantCode='ABC1' and Code='010'");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EsriHttpResponseMessage searchResponse = client.Get(path + query);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;HttpContent content = searchResponse.Content;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Should send this URI&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"query?where=PlantCode='ABC1' and Code='010'&amp;amp;f=json&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnIdsOnly=false"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But instead, fiddler shows this going through&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"query?where=PlantCode&amp;amp;f=json&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;returnIdsOnly=false"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Notice how after the PlantCode the equals sign is cuttoff?&amp;nbsp; How do i tell the EsriHttpRequest to ignore that and not do that.&amp;nbsp; This works in Postman, so I know it has to be possible.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 18:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/query-portal-tables-only/m-p/1142776#M7758</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2022-02-10T18:33:11Z</dc:date>
    </item>
  </channel>
</rss>

