Calendar component and not allowing entries before a submitted date

Hi!

For my applications i’ve used the calendar component where users can submit a renter for certain times. I’ve some troubles with not allowing entries where the arrival date is after the leave date (so negative dates).

I’ve now input a custom workflow that should check this and delete a record and display an error message if the rule has been broken, but it seems the people who’re stresstesting the application before launching to 200 personal users end of the week keep managing to do this.

It’s setup as follows:

A list collection with the add and edit function above a calendar collection showcasing the entries visually:

The add form with the custom workflow hooked up:

workflow with: arrival date is before leave date → else → show error → delete record

As you can see, the workflow steps in after entry, and I would ideally want to display an error message that the dates are not proper in the form submission.

For both date entries I’ve selected “today or later”

But for the second entry, leave date, I want to input “Arrival date or later”

Is there a better way to go about it than how I sett it up now?

It works most of the time, but users are still abled to work around the workflow somehow and create records with negative dates.

Please let me know! Thanks

Yes. It’s much better to detect the error before the form is submitted, and prevent the user from adding a row in the first place. You can do that with a Custom Form.

3 Likes

An alternative for you is something like this in the Timesheet tab.

1 Like

Thanks for sharing! Is there a way I can copy the app? That doesn’t seem to work. I saw you mention this in other, earlier posts regarding copying. It now leads me to a forbidden page

Hmm it seems like something @glide_help has to look into.

I was able to copy the template without issue. @LearnandEarn can you please let me know what browser you’re using that is giving you this issue? Also, if you’re having this issue in a Chromium-based browser, can you please try it in Firefox to see if that works?