I have a sharepoint list. It allow supervisors to make team assignments each morning. This helps us track accountability for each person on that team. I do not want to give them EDIT permission to the data table in the powerapp (sharepoint back end- See screen shot attached), as a bad actor could alter the driver assigned in the afternoon to help an ally or themselves avoid accountability for a vehicle issue, for example.
The power app allows them to ADD a record, and a different screen and button allows them to review what they have entered.
I am considering allowing the user / power app add a duplicate, corrected entry for that team color, if the teammate initially keys in the wrong team assignment.
This now gives me an issue to solve for:
RedTeam Vehicle #1 created 12/17/2020 @ 7:00AM
RedTeam Vehicle #1 created 12/17/2020 @ 7:05AM with different team assignments
At 7:45 AM each day, these team assignments get pushed (via a Flow) to Microsoft Teams channel for that red team,for example ,and the team will post any issues, photos of any issues, etc in the new conversation that FLow created
How can I return only the latest Team color entry for a given day using the max of the created field.
I will need to solve for this both in my flow, and the data table view that is shown for the supervisor to verify their entries.
For the table review, I use this in the items section : Filter(DailyTeams,Today() <= WorkDate) and this works fine, but will show a duplicate for RED team if I allow it. This needs to show only the max records for each team color.
My FLow has this in the sharepoint get items section, and it works great today:
Created gt '@{addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'), -1)}' and TeamColors eq 'Red'
I would need to account for a situation if duplicates are keyed in for a given team, so need the max if the team color, and created date here a well.
Thanks!