Format rule based on lowest time value

Hi all! I'm trying to figure out a format rule that will highlight a single row of a table based on whether a calendar start time is earliest in the list of selected rows and the date in the row is today. The idea is for field employees to always know which is their next work order for the day based on the format rule. I have this as a condition right now, it highlights all the rows for the day, not just the the one with the earliest calendar start time. Any ideas as to how I could tweak this? Thanks as always for the advice!

AND(ISNOTBLANK(MIN(SELECT(Service Ticket[CalendarStart],NOT([Status]="Resolved")))),[Date]=TODAY())

 

 

Solved Solved
0 3 144
  • UX
1 ACCEPTED SOLUTION

Please move the condition [Date]=TODAY() inside the SELECT() statement.

ISNOTBLANK(MIN(SELECT(Service Ticket[CalendarStart],AND(NOT([Status]="Resolved") , [Date]=TODAY()))))

However creating format rules with such heavy expressions is not recommended for the format rules as it can slow down users'  browsing experience. Please note the warning in the relevant help article.

Suvrutt_Gurjar_0-1659930994643.png

Format Rules: The Essentials - AppSheet Help

You could instead have a slice called say "Today's Unresolved Tickets" a with a filter condition AND( NOT([Status]="Resolved") ,[Date]=TODAY()) .  Then you could sort the table view in ascending order based on this slice on the column [CalendarStart]. This will always put the latest unresolved ticket for today in the first place. You can instruct the user also to sort the table view in ascending order to see the latest job today. You can also disable the table sorting by users in UX --> Options but it impacts the entire app which you may not want.

View solution in original post

3 REPLIES 3

Please move the condition [Date]=TODAY() inside the SELECT() statement.

ISNOTBLANK(MIN(SELECT(Service Ticket[CalendarStart],AND(NOT([Status]="Resolved") , [Date]=TODAY()))))

However creating format rules with such heavy expressions is not recommended for the format rules as it can slow down users'  browsing experience. Please note the warning in the relevant help article.

Suvrutt_Gurjar_0-1659930994643.png

Format Rules: The Essentials - AppSheet Help

You could instead have a slice called say "Today's Unresolved Tickets" a with a filter condition AND( NOT([Status]="Resolved") ,[Date]=TODAY()) .  Then you could sort the table view in ascending order based on this slice on the column [CalendarStart]. This will always put the latest unresolved ticket for today in the first place. You can instruct the user also to sort the table view in ascending order to see the latest job today. You can also disable the table sorting by users in UX --> Options but it impacts the entire app which you may not want.

Thanks @Suvrutt_Gurjar!

You are welcome.

Top Labels in this Space