You are viewing limited content. For full access, please sign in.

Question

Question

date field constraints

asked on December 6, 2016

I have a municipality wanting to use a form to request to meet with the Planning Commission. Is there a way, without hard coding dates, that they could be prompted to only select a 2nd or 4th Thursday of any given month? I understand that Thanksgiving would be unavailable as well as an occasional 4th of July or Christmas or other holidays that may happen to fall on a Thursday. In a related question, can you request from an IT department to check out a projector only Mondays through Fridays but not on Saturdays or Sundays (see BPL "Hardware Device Checkout" Business Process/Form)?

thanks, Doug

0 0

Replies

replied on January 18, 2017

This may not be the best overall solution, but if I were you, I'd probably do this using a data source, rather than trying to do it entirely in forms.  You'd probably want to create one data table that has the holidays you want to exclude (Thanksgiving, Christmas, Independence Day, etc.) - it probably wouldn't take too long to create that out for several years into the future.  Then make a database view that calculates dates that are in your desired periods (2nd or 4th Thursday) and exclude dates that are in the holiday table.  You could also limit your view to a certain time period (say between tomorrow and six months out).  Finally, instead of using a date picker field in your form, use a drop-down field, populated by the contents of your view.

I haven't tinkered with this at all, it's just a thought...

0 0
replied on January 18, 2017

Thanks Matthew. These are great ideas.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.