My expression result is changing in my google sheet after a few seconds. Why?

Jaros
New Member

Hi,

I have two expressions, one for Time In and one for Time out.

  1. If([Status]=“Absent without leave”,“00:00:00”,“08:00:00”)

The first one returns Zero

00:00:00

When I select Absent without leave?

  1. If([Status]=“Absent without leave”,“00:00:00”,“16:30:00”)

The second one is returning the current time, almost as if I had TIMENOW() expression and not the 00:00:00 I expected it to.

I also just checked in the Google sheet it is reporting to and when I synch it initially enters 00:00:00 for a couple of seconds in the column and then it changes to the current time. I’ve done it three times and it does it every time.

Any ideas why?

Solved Solved
0 7 151
1 ACCEPTED SOLUTION

Makes sense!

Perhaps the Only if this condition is true setting for the action might be useful?

View solution in original post

7 REPLIES 7

Looking at the information on this function Time()

Have you tried modifying your IF expression to include this around your textual time values?

Like

If([Status]=“Absent without leave”,TIME(“00:00:00”),TIME(“08:00:00”))

Might be worth a go?

TIME() shouldn’t be necessary here–AppSheet should recognize those quoted values as Time values.

@Jaros, please post a screenshot of the entire expression. Please also indicate where in the column configuration you used it: App formula, Initial value, or somewhere else? A screenshot of that column’s configuration screen might also be useful.

Jaros
New Member






I tried to include everything here. Let me know if you need anything else. The last two show you how the entry comes into google sheet and then a couple seconds later it changes from 00:00:00 to 02:45:05.

I see nothing wrong with the column configurations.

What is the user doing to add or update their attendance row(s)? A form? An action? Please provide screenshots of the configurations of any form views and/or actions involved.


@Steve , I see whats doing it, I initially setup an action to use TIMENOW() but the user asked me to make some changes. This action is what is changing it from my expression in the initial value to the TIMENOW(). Any suggestion on how I bypass this for the person who is not at work for that day?

Makes sense!

Perhaps the Only if this condition is true setting for the action might be useful?

Thanks once again Steve!

Top Labels in this Space