cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmjohn
New Member

How to select row in a table based on what time of day and what day of week it is.

 

Hi,

 

Attached is a PowerApps I built for work, we use it to communicate the what machine the employees are scheduled to work on for the day (names go where white blocks are shown). On the left are are and shift, along we top are machine names (also whited out).

I'd like to get the pink selection bar to highlight the day and shift it is so operators know immediately where to look. 

Question: How do I get the selection bar in a table to scroll down the rows based on what day of the week, and what time of day it is.

 

Purpose: to highlight the row representing the current shift.

This would be very helpful for us!

Thank you for your time.

2 REPLIES 2
mahoneypat
Solution Sage
Solution Sage

You can set the Default for your gallery to dynamically find the record that matches the current day of week and hour (or whatever types of values are in your datasource/collection).

 

For example, I made a simple gallery with items of ["Monday", "Tuesday", "Wednesday"] and use this formula to set the default.  You could add a second field to the record expression to add a formula that finds the current hour from Now() also.

 

{Value: Text(Now(), "[$-en-US]dddd")}

 

Pat

Thank you for the response Pat,

 

TBH I do not understand what you are suggesting.

 

I am using a table display format, not a gallery. I am using a table because it is easier to add/remove/move columns as we purchase/sell/relocate machines.

 

I am curious if there is a field that controls which row is selected. If there is, I could write a formula that selects a row based on timestamp information.

Thank you.


Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (62,520)