Hi all,
Iโm creating a timesheet for employees to manage their clock in & clock out. Right now I have 2 columns โTime Inโ & โTime Outโ that is non editable.
Time In = [Timestamp] so that employee can use the very initial time when they start the form
Time out = NOW()
Iโm facing a problem with NOW() as employee might want to edit the forms after they saved. Once they went to the edit button, the time out changed to the current time instead of the time they saved.
Is there a way to keep a static time of the saved forms?
How did yo make them โnon editableโ?
Where does [Timestamp]
come from? How do you implement Time In = [Timestamp]
? App formula? Initial value?
How did you implement this? App formula? Initial value? Action?
Sorry, Because previously my app allows users to set the time themselves and I felt that the results werenโt that accurate and many employees kinda cheat on the system. Thatโs why I was trying to make the โTime inโ & โTime outโ non editable and only allows current time of the device.
The [Timestamp] is from the time when the row is created. I implemented in App Formula.
App formula.
Rather than using App formula for Time In, I would recommend moving the expression from App formula to Initial value, then setting the columnโs Editable? setting to the expression, FALSE
. This will set the columnโs value when the row is created (whereas App formula resets it every time the row is changed) and prevents the user from changing the value.
Thanks! But the main concern is actually the โTime Outโ. How do I able to save a time for โTimeoutโ of the form?
Pretty much the same way.
Hey @Steve_Tan I would make use of an action to set the timeout, giving the user the ability to tap it and set the actual time to โnowโ but not allowing them to actually modify the value.
For the timeout, I would put a show if formula to restrict when itโs seen so we donโt see it in the form
Create an action that sets the value of the Timeout column (something similar to this)
Or you could create an enum column inside your timesheet table, and use that as a โclock outโ button inside the form.
You could use a ChangeTimestamp column thatโs watching this enum column for whatever value you use for the button text - when it finds that text, say โClock Outโ it records the timestamp.
This would keep you inside the form, if you wanted, but requires a little more handling.
Once you do that editable if statement, once they select the clock out option, they canโt unselect it - and if you base your timestamp on that then you get your clock time.
You could apply an additional show if to the button, only showing it when itโs blank - that way after they tap the clock out button, it disappears (maybe making the clock out time visible (but they canโt edit it as itโs a Change column and is controlled via the system)).
Hi,
I followed your instructions but I dont see any button in the form. Do I miss out something?
Actions arenโt visible inside the form, theyโre for modifying data outside in the other view types.
My suggestion was to move the โclock outโ mechanism to an action, visible on the detail view (or possibly a table or other inline view) that the user can tap to clock out faster than having to go through the form.
Hi,
Is there a way to be edited in the form instead?
If I understand correctly: you want the [End Time] to not be editable when they user is first creating the record, but editable when they edit the record again, but not after they enter the time. Yes?
There are many different ways to skin a cat, but perhaps the easiest would be to base things off timestamps. For example: the following formula will hide the column, but only for the first minute after the record was created if put in the Show If space:
NOW() >= ([Timestamp] + "000:01:00")
You can easily adjust the time window by changing the duration youโre adding to the timestamp.
I would put the following formula inside the Edit If space:
and(
isblank([_this]),
NOW() >= ([Timestamp] + "000:01:00")
)
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |