How to find next employee?

Hello all,
I’ve been trying to figure out how to find the next employee but couldn’t. For example, I have start time and end time as it is shown in the screenshot. It’s Joe’s shift as it equals 1 based on If Then Else Column.

I would like the app to show who is next? the next one will be Steven (last row), how to do so? any hint/clue?

I think you can have a numerical order column in the sheet (1, 2, 3, etc.) and make a math column in Glide (current row’s numerical order + 1), then make a relation.

1 Like

Seems a solution but can you elaborate more? make a relation? between Order (Numerical Order) and If Start & End? it won’t match! I might be confused and I will be so glad if you elaborate more

I think the missing part here is a column that determines which numerical order value is “current”. Possibly a long con but you can make a math column with the value 1, make a relation back to the start & end if then else, then a lookup to return the current row (15).

Then a math column to determine the next, so current + 1 = 16. A relation from that “next” column back to the order will be the final one.

2 Likes

:thinking:But… Am I wrong or these are fixed shifts? If the end time always coincides with the start time of the next shift, then you could simply relate end time to start time in the same table. In this case, after Steven it would not be anyone’s turn because the relationship would be empty.

1 Like

If you are wanting to know who is next using the times and they are fixed shifts you can use the now function within glide to find the current time. Then make visible only times that are greater than current time. sort the list from smallest to large and limit the list to 1 item.

1 Like