Hi @v-jefferni ,
Sorry, I used misleading naming conventions. It's not as you say, I can give you more details here.
So, I have a scoreboard which sums up scores for every quarter (last 90 days) then on the 90th day, the first or highest score per board should be written to another table.
The problem with filtering my gallery by, records>=Today()-90, is that some scores would be carried through into the next quarter.
The hide record naming convention is something I initially thought about to hide the records from my galleries by filtering it out.
The solution I came up with works like this, (I'd like to have this in PowerAutomate, So I don't have to run the app for onvisible every time the counter reaches 0)
Note that I changed the naming of Hide Records to IsArchived,
Every last 90 day block of records =

I then calculate the days elapsed,
DateDiff in days
Between First Record Date & Today() = Day Difference
THEN,
90 – Day Difference = Day Count
E.g., 89,88,87,86 … 0
Eventually,
I write the highest scores to another table,
With something like this,
If(varDaycount = 0,
If(CountRows(Filter('Games Win History',Text('Date of Entry',"mm/dd/yyyy") = Text(Today(),"mm/dd/yyyy") && 'Game Played'="All Games")) = 0,
Collect(ColAllGames,'Game Scores');
ClearCollect(ColAllGamesPatched, First(Gallery1.AllItems));
Set(myrecord, LookUp('Games Win History', myrecord.ID = ID));
Patch('Games Win History',
ForAll(Gallery1_1.AllItems,
{
SumofValue: Gallery1_1.Selected.'Sum of Value',
TeamAliasText: Gallery1_1.Selected.TeamAliasText,
'Game Played': "All Games"
}
)
)));
Once that is done,
While Day Count still = 0,
Update all existing scores to IsArchived = Yes
Move all IsArchived = Yes records to Table: Game Scores Archived using a flow
So again, it's all dependent on the Day Count being 0. How can I do this in PowerAutomate? i.e., have an automatic count that performs these actions, so that I don't have to open the PowerApp every time the count = 0 to make sure all the code on, onvisible is executed.