<?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 AGOL content based on group and group categories in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1284987#M51865</link>
    <description>&lt;P&gt;Are groupID and categoryName variables you've assigned earlier in your code?&amp;nbsp; Doesn't make sense to pass them as strings if so&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
gis = arcgis.gis.GIS("https://www.arcgis.com", "username", "password") 
dashboardItems = gis.content.search(query=f"group:{groupID} AND categories:'{categoryName}'", 
item_type="Dashboard",max_items=9999)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 21:47:15 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2023-05-02T21:47:15Z</dc:date>
    <item>
      <title>Query AGOL content based on group and group categories</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1284949#M51860</link>
      <description>&lt;P&gt;I'm attempting to query all of my organization's AGOL content that is a dashboard, within a single group (based on the group ID), and has a specified group category.&lt;/P&gt;&lt;P&gt;Here is a snippet from my code:&lt;/P&gt;&lt;PRE&gt;import arcgis&lt;BR /&gt;gis = arcgis.gis.GIS("https://www.arcgis.com", "username", "password")&amp;nbsp;&lt;BR /&gt;dashboardItems = gis.content.search(query="group:groupID AND categories:'categoryName'", &lt;BR /&gt;item_type="Dashboard",max_items=9999)&lt;/PRE&gt;&lt;P&gt;I am not returning any dashboards with the query, though there are around 20 dashboards in the group that would meet the criteria. Think it's an issue with the syntax in the query, but I can't figure it out.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 20:37:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1284949#M51860</guid>
      <dc:creator>JulianaSpector1</dc:creator>
      <dc:date>2023-05-02T20:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Query AGOL content based on group and group categories</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1284987#M51865</link>
      <description>&lt;P&gt;Are groupID and categoryName variables you've assigned earlier in your code?&amp;nbsp; Doesn't make sense to pass them as strings if so&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
gis = arcgis.gis.GIS("https://www.arcgis.com", "username", "password") 
dashboardItems = gis.content.search(query=f"group:{groupID} AND categories:'{categoryName}'", 
item_type="Dashboard",max_items=9999)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 21:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1284987#M51865</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-05-02T21:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query AGOL content based on group and group categories</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1286378#M52008</link>
      <description>&lt;P&gt;I didn't assign groupID and categoryName as variables earlier in the code. Was trying to read them into the query as strings.&lt;/P&gt;&lt;P&gt;I did try your approach and assigned groupID and categoryName as variables and still not returning any results with the query unfortunately.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE&gt;import arcgis&lt;BR /&gt;&lt;BR /&gt;groupID = " " # string with group ID&lt;BR /&gt;categoryName = " " # string with category name&lt;BR /&gt;&lt;BR /&gt;gis = arcgis.gis.GIS("https://www.arcgis.com", "username", "password")&amp;nbsp;&lt;BR /&gt;dashboardItems = gis.content.search(query=f"group:{groupID} AND categories:'{categoryName}'", &lt;BR /&gt;item_type="Dashboard",max_items=9999)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 05 May 2023 20:22:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/query-agol-content-based-on-group-and-group/m-p/1286378#M52008</guid>
      <dc:creator>JulianaSpector1</dc:creator>
      <dc:date>2023-05-05T20:22:31Z</dc:date>
    </item>
  </channel>
</rss>

