Today() - 1 Not working on form (fixed I was being stupid)

Either I am just being blind to something obvious, or it is not working as I have done a 1000 times before… why isn’t the formula TODAY() - 1 not working on this form?
I can set it up as a virtual column and it gives me the correct date

If I set it up as a formula, it works as expected, but then isn’t editable.

If I then remove the virtual column, it shows it as expected

Until I cancel out of the screen and go back into it. It then shows 12/01/2026… If I add the virtual column again, it changes back to the 11th, until I cancel out of the screen again.

Perhaps it has something to do with the column format, make sure it’s a Date.

Also try brackets in your formula =(TODAY() - 1).

It could also have something to do with the timezones for device or set in the google sheets table

2 Likes

Thanks for the suggestion. I’ve tried all of those apart from the timezone. I don’t think this is it as the virtual column works, but I’ll check tomorrow.

I’ve worked on this one stupid problem for over a hour today.

You’re aware that a normal/non-virtual column, even with Editable? and Reset on edit? enabled, only updates if the row itself is updated (as by saving it from a form view, or modifying it with an action)?

4 Likes

I tested this in an app I have and it works fine for me. Both the static date column with the initial value set to ‘TODAY() - 1’ and reset on edit toggled and the virtual column with the same expression evaluate correctly.

The only thing that I’m thinking of is did you save the app? In the screenshot provided, the virtual column has the correct date and the static column has the incorrect date, but I also noticed that the app wasn’t saved. A lot of times, changes in forms don’t truly reflect until the app is saved, then it works.

I wonder if this is the issue because I have it set up exactly as you do and it’s working fine

2 Likes

Thanks for everyone who added their thoughts and tests… I did spend hours yesterday on this and it is because I was sending the today() command over to the form when it was opened.

Changed the topic name and removed it from bugs…

I’ve spent far too much time doing AppSheet stuff this week and became blind to the obvious.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.