Check Clocked In Users

 

Hoping someone can help me sound this problem out.

I have a master sheet that records all signing in and out, I don't want to change that as it works for my purposes:

KeyTimestampWorkedActionAssociate EmailAssociate Name

 

AND(TODAY() = Date([Timestamp]), 
    [Action] = "Clock In",
    NOT(IN([Associate Name], SELECT(Clocking Log[Associate Name],  
                          AND(TODAY() = Date([Timestamp]), [Action] = "Clock Out"))))
)

 

This expression allows a slice to see who is currently clocked in.

I am trying to prevent someone who is currently NOT clocked in, selecting "Clock Out" from the Enum buttons.

Can anyone think of a neat way to disable the 'Clock Out' option based on the fact that specific user isn't clocked in, without creating a whole new sheet and using a bot to update it?

I'm hoping to leverage the expression and the slice, if possible, but I can't come up with an expression that works for a suggested value.

Solved Solved
0 6 146
1 ACCEPTED SOLUTION

Assuming the Slice that you posted originally is working, to show only records from today, and only of clocked-in people, you can get the list of clocked-in peoples' emails with:

clocked_in_slice[Associate Email]

Then maybe you can set the valid_if of your [Action] column to something like:

IF( IN( USEREMAIL() , clocked_in_slice[associate email] ) , LIST("Clock Out") , LIST("Clock In") )

 

View solution in original post

6 REPLIES 6

NOT( IN( ... , clocked_in_slice[...] ) )

?

Getting to the point of frustration with it now. I have broken my clocking system attempting to think my way around this problem.

All I want it to do is check to see if the current user has a record with today's date in it, if it has, display "Clock Out", if not, display "Clock In". Somehow that completely evades me in this context.

I can write an expression that should work, but the USEREMAIL might be where I'm falling down, it doesn't seem to recognise that?

Assuming the Slice that you posted originally is working, to show only records from today, and only of clocked-in people, you can get the list of clocked-in peoples' emails with:

clocked_in_slice[Associate Email]

Then maybe you can set the valid_if of your [Action] column to something like:

IF( IN( USEREMAIL() , clocked_in_slice[associate email] ) , LIST("Clock Out") , LIST("Clock In") )

 

It was the LISTs! 😭

It isn't a complete solution, this arrangement only recognises the first clock in. Subsequent ones don't register as 'Clocked In' but that will, quite honestly, have to wait for another day as I have no clue why it's happening!

Thank you for helping me deal with my madness. I owe you a beer.

"I owe you a beer."

That'd be nice, I'm running low... 😰

What happened to everyone having a 'buy me a beer' links in their signature?

Thinking about it, I'm sure they died out with MSN and Myspace 😂

Top Labels in this Space