Valid If Expression not working as expected

This is somewhat a follow up to this thread
https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Expression-Assistance-Only-Show-Button-if-Not-Record-Exists-with/m-p/460066#M181179

I was using this expression to control the visibility of a button to submit daily totals:

COUNT(
FILTER(
"Daily Totals",[Date]=TODAY()))
=0

with the idea that the button would only show if totals for the day had not been submitted. It worked, but it introduced a problem of not being able to retroactively add totals for missed days if a record already exists for today.

So i figured i could use the same formula as a “valid if” expression on the Date column and pop up a message like “A record already exists for the selected date. Please enter another date or edit the existing record.”

The formula is accepted as a working expression, but it is not working to reject the form entry as expected. What am i missing?

cancel, i am an idiot… I tested using a date that is not today :joy:

it works fine, but i need to edit my filter to have it just make sure that the date being entered does not exist…
problem solved, thanks for coming to my TED talk.

1 Like

working fine. If anyone is interested in the fix, i adjusted the expression to

COUNT(
FILTER(
"Daily Totals",[Date]=[_THISROW].[Date])
)
=0
2 Likes