<?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: Get a specific item by user and itemType in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257944#M8372</link>
    <description>&lt;P&gt;I just tried to replicate what is found in &lt;A href="https://support.esri.com/en/technical-article/000024383" target="_self"&gt;ESRI docs&lt;/A&gt; for the combined query parameters.&amp;nbsp; The itemType param is outside of the first combo params for title and user, I didn't see anything for using AND condition anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not totally certain that this was even a problem for my implementation at all: I was attempting to run a report off a Survey123 (which works great) but before execution the requirement was to delete any exisitng report previously created.&amp;nbsp; This was failing and causing a new report to be created with the same title but a datetime stamp was being added to the title.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To remedy I simply created another Notebook to cycle&amp;nbsp;through the folder and delete any items of type pdf to guarantee none would exist the next time the generate report Notebook ran.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 13:43:44 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2023-02-14T13:43:44Z</dc:date>
    <item>
      <title>Get a specific item by user and itemType</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1256308#M8358</link>
      <description>&lt;P&gt;I have a Notebook running in AGOL org account that is supposed to find a specific item for a user but it always returns all a list of the items of that type for the user, not the 1 item specified in they query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;items_existing = gis.content.search(query="title:SomeItemTitle, owner:someusername", item_type='PDF')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not return the single expected item with the title "SomeItemTitle" and returns the list of all items of type PDF for that user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I not implementing this correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: the problem is that I NEED to delete an item with the exact title name because it will be recreated again with the same title (getting a new itemId).&amp;nbsp; What I am running into is that it cannot find the specific item by title and for some reason when it recreates the pdf item it adds on a datetime stamp into the title name.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 22:18:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1256308#M8358</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2023-02-08T22:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get a specific item by user and itemType</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1256314#M8359</link>
      <description>&lt;P&gt;I think what I'm running into is that if the item title is not found then it will return a list of all items of that type for that user.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is sort of confusing as I am expecting an empty list!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 21:41:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1256314#M8359</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2023-02-08T21:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get a specific item by user and itemType</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257877#M8371</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/8274"&gt;@JamesCrandall&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I see that you use comma to separate the query. Did you try a space or &lt;EM&gt;AND&lt;/EM&gt; clause?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 09:01:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257877#M8371</guid>
      <dc:creator>Kepa</dc:creator>
      <dc:date>2023-02-14T09:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get a specific item by user and itemType</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257944#M8372</link>
      <description>&lt;P&gt;I just tried to replicate what is found in &lt;A href="https://support.esri.com/en/technical-article/000024383" target="_self"&gt;ESRI docs&lt;/A&gt; for the combined query parameters.&amp;nbsp; The itemType param is outside of the first combo params for title and user, I didn't see anything for using AND condition anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not totally certain that this was even a problem for my implementation at all: I was attempting to run a report off a Survey123 (which works great) but before execution the requirement was to delete any exisitng report previously created.&amp;nbsp; This was failing and causing a new report to be created with the same title but a datetime stamp was being added to the title.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To remedy I simply created another Notebook to cycle&amp;nbsp;through the folder and delete any items of type pdf to guarantee none would exist the next time the generate report Notebook ran.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 13:43:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257944#M8372</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2023-02-14T13:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get a specific item by user and itemType</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257948#M8373</link>
      <description>&lt;P&gt;Glad you've managed a workaround for it. Just to add up,&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Group.search" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;you can find query string recommendations and examples on search method in case you want to have a look.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 13:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257948#M8373</guid>
      <dc:creator>Kepa</dc:creator>
      <dc:date>2023-02-14T13:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get a specific item by user and itemType</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257981#M8374</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; This is very useful!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 14:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/get-a-specific-item-by-user-and-itemtype/m-p/1257981#M8374</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2023-02-14T14:52:17Z</dc:date>
    </item>
  </channel>
</rss>

