<?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 Get the most recent date with a pulldata in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1306262#M50478</link>
    <description>&lt;PRE&gt;&lt;SPAN class=""&gt;I want to set up a form that allows to control the vegetation on plots. A plot can be checked several times during the year.&lt;BR /&gt;When collecting a new survey I would like to retrieve the date of the last control carried out on the plot with a pulldata on the feature layer of the form itself, like this:

pulldata("@layer","getValueAt","attributes.date_collecte",${feature_layer_id_parcelle},${Location})

My questions:&lt;BR /&gt;Can I know the last date of passage on a plot that has been visited several times? Can we do calculations in a pulldata ?

Can the pulldata query the form service itself? I think so, it's a service like any other.&lt;BR /&gt;Besides, it makes me think that this method can be used if you want to do an incrementation on continuous numbering like tree numbering (pulladat + 1)
So can we imagine making a

…,”attribute.max(value),”…

Thank you for your many feedback..&lt;BR /&gt;&lt;BR /&gt;PoleSIG&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 16:52:28 GMT</pubDate>
    <dc:creator>Polesig</dc:creator>
    <dc:date>2023-07-06T16:52:28Z</dc:date>
    <item>
      <title>Get the most recent date with a pulldata</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1306262#M50478</link>
      <description>&lt;PRE&gt;&lt;SPAN class=""&gt;I want to set up a form that allows to control the vegetation on plots. A plot can be checked several times during the year.&lt;BR /&gt;When collecting a new survey I would like to retrieve the date of the last control carried out on the plot with a pulldata on the feature layer of the form itself, like this:

pulldata("@layer","getValueAt","attributes.date_collecte",${feature_layer_id_parcelle},${Location})

My questions:&lt;BR /&gt;Can I know the last date of passage on a plot that has been visited several times? Can we do calculations in a pulldata ?

Can the pulldata query the form service itself? I think so, it's a service like any other.&lt;BR /&gt;Besides, it makes me think that this method can be used if you want to do an incrementation on continuous numbering like tree numbering (pulladat + 1)
So can we imagine making a

…,”attribute.max(value),”…

Thank you for your many feedback..&lt;BR /&gt;&lt;BR /&gt;PoleSIG&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 16:52:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1306262#M50478</guid>
      <dc:creator>Polesig</dc:creator>
      <dc:date>2023-07-06T16:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get the most recent date with a pulldata</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1306388#M50491</link>
      <description>&lt;P&gt;I think this could be done by adding extra parameters to the URL as described in the Request Parameters section of this&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_BB97985CAFB740EE8AEF99EFD6E238E3" target="_blank" rel="noopener"&gt;help topic&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;pulldata("@layer", "getValueAt", "attributes.dateCollected", "&amp;lt;yourFLURL&amp;gt;/0?orderByFields=dateCollected DESC&amp;amp;resultOffset=1", ${Location})&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Note that the URL includes a ? sign and then extra parameters to refine the query: sort by date in descending order and return only one record. That would give you the record with the most recent dateCollected date.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 21:54:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1306388#M50491</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2023-07-06T21:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Get the most recent date with a pulldata</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1405687#M55969</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I'm using the example you published above, but it doesn't seem to be pulling the most recent record, it pulls the second oldest record.&amp;nbsp; If I drop the resultOffset=1, it pulls the oldest record instead of the newest. Below is what I have in my spreadsheet:&lt;/P&gt;&lt;P&gt;pulldata("@layer", "getValue",&lt;/P&gt;&lt;P&gt;"attributes.inspection_date","&lt;A href="https://services5.arcgis.com/YTApDBs0YanBdxkq/arcgis/rest/services/service_d05d28403a9d4482a58f367dc2b9ef43/FeatureServer/0?orderByFields:inspection_dateDESC&amp;amp;resultOffset=1" target="_blank"&gt;https://services5.arcgis.com/YTApDBs0YanBdxkq/arcgis/rest/services/service_d05d28403a9d4482a58f367dc2b9ef43/FeatureServer/0?orderByFields:inspection_dateDESC&amp;amp;resultOffset=1&lt;/A&gt;", ${where2})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;${where2} =&amp;nbsp;concat("asset_id = '", ${asset_id}, "'")&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 13:04:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/get-the-most-recent-date-with-a-pulldata/m-p/1405687#M55969</guid>
      <dc:creator>BNix_TPA</dc:creator>
      <dc:date>2024-04-04T13:04:57Z</dc:date>
    </item>
  </channel>
</rss>

