Find Most Recent Record for each Unique ID

231
1
02-20-2024 06:17 PM
TomFlahive1
New Contributor II

I have a feature service that holds Vehicle information.  For each vehicle with a given Vehicle_ID there can be multiple records in this feature service.  What I would like to do in Power Automate is to retrieve a list of the latest record for each Unique Vehicle_ID.  Is there a way to use the ArcGIS "Get data from feature layer" action to accomplish this?  

1 Reply
TomFlahive1
New Contributor II

That is correct.  For a particular Vehicle_ID, say "TR-115", there would be no more than a single record for any one day, but there are  multiple records for the same vehicle over time on different dates.  And I am trying to get a list of just the most recent record for each Vehicle_ID.

Most of the Power Automate examples I found online use a SharePoint table as an example.  Using a SharePoint action, they first sort the table by the unique ID in ascending order, and date in descending order, and then use another field called Top to get the top 1 record for each unique ID.   But looking at the ArcGIS "Get data from feature layer" action, I don't see a way to pull the top 1 record for each Vehicle_ID.  But maybe there is a way to accomplish something similar.

0 Kudos