I made a presence app to record faculty members and other staffs activity during Covid19 WfH. I manage using form to capture timestamp, clock-in, location, photos, activities, and clock-out. I wish to set the clock-out should be on the same date as clock-in. Is it possible if user forgot to clock-out it will automatically clocked-out by app on 23.59. I do appreciate for any comment and suggestion. I search that it is not possible at the moment to use server/system side trigger action to accomplish this.
Solved! Go to Solution.
Thank you for the updates.
Since you have [Clock In] and [Clock Out] as TIME type columns, I believe the earlier suggested valid_if expression will not work.
Instead you may set the expression [Date]=TODAY() in Editable_if constraint of [Clock In] and [Clock out] columns.
This will ensrue that the user can edit these values only if the record creation date is today.
I believe , if your column type is Time, your initial value can be simply an expression as TIME(โ23:59:59โ)
Since [Clock Out] will always have an initial value of โ23:59:59โ , you may have a slice expression something like
AND([Date]=TODAY(), [Clock Out]= TIME(โ23:59:59โ))
This will list all of todayโs records where the user has yet not entered any other [Clock Out] time than the default initial time of โ23:59:59โ. Only lacuna of this slice filter expression is if a user has purposely entered [Clock Out] time of โ23:59:59โ , then also it will be included in the โWorking Nowโ slice.
Hi @romanus,
It is not clear what type of column you have for [Clock in] and [Clock Out] . Presuming you have datetime type columns for [Clock in] and [Clock Out], you could have valid if constaint in the [Clock out] column as
Date[Clock out]= Date[Clock in]
Edit 2: My bad for a typo. Please have expression as
DATE([Clock out])= DATE([Clock in] )
The above constraint will ensure that the user enters the clock out time on the same day as Clock in
Also you may set โinitial valueโ of [Clock Out] to expression
DATETIME(CONCATENATE(TODAY()," ", โ23:59:59โ))
This will ensure that if the user forgets to enter the clock out time, the initial value records the desired clock out time.
Edit: Alternatively, initial value of [Clock out] can be
DATETIME(CONCATENATE(DATE([Clock In])," ", โ23:59:59โ))
Thank your very much @Suvrutt_Gurjar for your reply and explanation.
I have my Clock-in=TIMENOW() and Clock-out empty both as Time, and I have another column of [Date]=TODAY().
I also set a View called โWorking Nowโ from Slice showing users with filter if Clock-out is empty, so I can see a list of users Clock-in and currently working.
Then I will set initial value you suggested to DATETIME(CONCATENATE(DATE([Clock-in])," ", โ23:59:59โ)) as well as the View filter from slice mentioned above to [Clock-out]=โ23:59:59โ.
If the the date of TODAY and Time of 23:59:59 has passed, is the list of currently working users will automatically removed from โWorking Nowโ View since it is not valid anymore?
Thank you for the updates.
Since you have [Clock In] and [Clock Out] as TIME type columns, I believe the earlier suggested valid_if expression will not work.
Instead you may set the expression [Date]=TODAY() in Editable_if constraint of [Clock In] and [Clock out] columns.
This will ensrue that the user can edit these values only if the record creation date is today.
I believe , if your column type is Time, your initial value can be simply an expression as TIME(โ23:59:59โ)
Since [Clock Out] will always have an initial value of โ23:59:59โ , you may have a slice expression something like
AND([Date]=TODAY(), [Clock Out]= TIME(โ23:59:59โ))
This will list all of todayโs records where the user has yet not entered any other [Clock Out] time than the default initial time of โ23:59:59โ. Only lacuna of this slice filter expression is if a user has purposely entered [Clock Out] time of โ23:59:59โ , then also it will be included in the โWorking Nowโ slice.
Thank you very much for the updated solutions @Suvrutt_Gurjar. Itโs now the best solution for me!
User | Count |
---|---|
41 | |
27 | |
27 | |
20 | |
13 |