Clock in problem

As we know, we can clock in our time directly by refering ‘Time Clock’. But i found that we can clock in more than one times at the same times. For example, i clock in at 9.00am, and i havent clock out yet, then, i still can clock in at 9.01am. Means that i can clock in many times at the same time. How can i solve it?

0 4 201
4 REPLIES 4

Aurelien
Participant V

HI @Warren_Wong

Welcome to the community !
I assume you are talking about the Timesheet Tracker Sample App ?

If so, you have to keep in mind that the “Clock In” View is a form view type.
You may want not to display that view with a show_if condition, if one has been clocked in yet.

For example:

 ISBLANK(
    FILTER("Timesheet",
        AND([Name]=USEREMAIL(),
          ISBLANK([Date/Time Out])
       )
    )
 )

Here, what I literally achieve this way is:

  1. filter timeSheet Table, where it’s my email and I did not clock out yet
  2. check if the result list is empty

Then, if it’s empty, that means: “I did not clock in yet, so it’s OK to clock in now”.
And then, it’s OK to allow the user to see that view.

You will want to use this expression here:

Please see also:

Let us know if that works for you !
Cheers

Hi, I have similiar problem and i did the above mentioned query but still its not working.

There's two ways to think of solving this issue.

  1. At the data level: You can think of adding a data level constraint for the Checkin Time column. For example, make the column read-only if it is already not blank. The semantics of this will be that once the checkin time is specified, it can never be modified again. Likewise, you might want to make the Checkout Time also readonly if it is not blank. Also, add a validation constraint on the Checkout Time column that ensures that it is greater than the Checkin Time.
  2. At the presentation level: if you have views where the updates can occur, you can choose to conditionally show/hide the entire view with a view-level Show-If condition, or conditionally hide just the column within the view with a column-level Show-iF condition. If Checkin and Checkout are actions, then they can also be shown or hidden based on whether the value in those columns is blank.

 

When choosing between the two approaches, the data level constraints are tighter and less prone to error. So usually, I prefer that. But also, they are less forgiving in case there is a need to correct wrong entries via the app.

Thanks Prave but iam not getting.Can you tell me step by step where should i go and do these steps.

Top Labels in this Space