Actions for "Save" Button

When I click the "Save" button in the Mobile Application I created, if the time is between 09:00 and 13:00 during the day, it should save, otherwise it should give a warning saying "Form is closed for recording". Do I need to define an Actions for the "Save" Button? The method below did not work. The form continues to receive registration. How can we do this?

Behavior

Only if this condition is true: AND(
TIME(TIMENOW()) >= "09:00:00",
TIME(TIMENOW()) <= "13:00:00"
)



il_han_0-1739622429787.png

Don't mind the date on the picture, I corrected it.

Solved Solved
0 10 221
2 ACCEPTED SOLUTIONS

Hey @il_han

You can prevent users from submitting a form between 9 AM and 1 PM using Valid_If, which blocks the submission and shows a clear error message.

Add a DateTime column (e.g., [FormCheck]) in your table.

Set Initial Value to NOW().
Make it Required so it always records the time.
Hide it with Show_If = FALSE if you donโ€™t want users to see it.
Use Valid_If to block submissions at the wrong time

OR(
HOUR([_THIS]) < 9,
HOUR([_THIS]) >= 13
)
This allows submission before 9 AM or after 1 PM.
If itโ€™s between 9 AM and 12:59 PM, the form cannot be saved.
In Invalid value error, write: "Form submissions are only allowed outside 9 AM - 1 PM. Please try later."
In [FormCheck], enable "Reset on edit", so NOW() refreshes when users edit the form.
If a user tries to save a form between 9 AM - 1 PM, AppSheet prevents submission and displays your message. Simple and effective !

Jee

View solution in original post

Hey @il_han 

If you want a column to reset automatically when another field in the same row is edited, just check "Reset on edit?".

In your case, you should enable "Reset on edit?" on the [FormCheck] column so that it updates the timestamp when the form is submitted. This ensures that the time is correctly checked at submission instead of staying stuck on the value from when the form was first opened.

Youโ€™ll find this option under Data > Columns > FormCheck in AppSheet.

Hope that helps!

Jee

View solution in original post

10 REPLIES 10