OK Thanks @Anonymous ,
Now I see there is no clock - you just want the dates put in those fields in the SharePoint list (I assume they are connected to it) when the user presses the relevant button. I assume you also to stop multiple presses (once it is pressed, it is set).
I will add a bit to my first post and see if this works for you.
I will call the text controls for the first ClockInTime and the Button ClockInBtn - replace these with the name of your buttons and obviously repeat for the other button.
So on the OnSelect of ClockInBtn
UpdateContext({vInTime:true});
Reset(ClockInTime)
On the Default of ClockInTime
If(
vInTime,
Text(
Now(),
DateTimeFormat.LongDateTime
),
Parent.Default
)
This will show the SharePoint field value unless reset by the button, in which case it will change to the current time.
On the DisplayMode of ClockInBtn
If(
isBlank(ClockInTime),
DisplayMode.Edit,
DisplayMode.Disabled
)
This will disable the button if there is a time in the box
Finally, when you exit the screen by screen, reset the Variable - it is also a good idea to do this on screen entrance
UpdateContext({vInTime:false})
Repeat for the out time, but use a different Variable (vOutTime would be good)
Please let me know if this does what you need - I probably should have asked for screenshots earlier.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.