Script to Find Earliest/Latest Date entry from a set of records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello!
I've been tasked with finding a way to coalesce reporting data in a custom app and am not quite sure how to surface the earliest and latest dates associated with a record.
The inputs are from a report generated in a Custom app. Essentially, 1 or more "zones" are selected and a stop and start time are entered. This spits out a report of all devices associated with the zone(s) and assigns the start and end date to them. The entries are coming from unique fields (long story) so it's possible to have not only a duplicate device but for each to have their own start and end times.
The outcome being requested is essentially to coalesce the data on each device, and assign to it the earliest start time and the latest end time for an exportable report. Example - Report gets generated based on Zone 1 and Zone 2. Device A appears in each zone, so on the report it displays twice; once each with it's respective Zones Start and End time. The coalesced report would spit the Device once with just the earliest start and latest end.
I'm using Flow designer for this and have already built out the initial lookup to return just the unique Device entries so I at least have a starting point for a "For each item", but can't seem to figure out getting the date entries. I'm presuming they'll be similar scripts and I'm assuming I'll need to do separate lookups, which is fine, just need a little help (and Now Assist isn't cutting it!)
Thanks,
Erik