I am trying to create a simple scheduler for laundry delivery.
The first drop down menu should display dates, starting with tomorrow, then extend out 7 days, AND exclude sundays (when we are closed). So it should look similar to this:
Unfortunately, the dynamic date/time construction isn’t working. Here is what I currently have that isn’t working:
The obvious problem is that I in no way understand the logic of what the program is trying to do. Can anyone help?
Great question - I have a recommendation why don’t you use the Date/Time Picker?
This element lets you users pick a date and (optionally) a time with a calendar type interface. The value returned by this element is a date that can be used in date fields.
It’s under Input Forms and is built to handle date/time functions much better than the generic dropdown box. Then you can add your logic inside an element that know date/time definitions.
I wasn’t using the date picker because (foolishly?) I was thinking that this would be the simplest. Maybe not from a programatic stand point, but from a user standpoint. Especially because the options are going to be so limited. Dates are only tomorrow +7 days, and there will only be 3 times users could choose from. A 2 hour block in the morning, another in the afternoon, and a final in the evening.
So the overall functionality would be a quick select day, select time slot, then schedule.
With this in mind, it seemed like 2 drop down menus were quick and clean.
Just tried the date/time picker and the logic was much easier to solve. I don’t know if I like having an entire calendar pop up.
I’m 100% throwing out an idea that I have no clue if its even possible, so bear with me. What if you created a table called Available Days, and you only put 7 days in it. Schedule an API workflow for midnight that empties that table, then adds a new 7 days, then schedules the API workflow for current date/time+24 hours.
Your data source for the dropdown would be something like, “do a search for > Available Days”
No clue if it’s possible or not, but I’m sitting in a meeting that hasn’t started yet and was thinking on it.
That’s interesting. It’s amazing how complicated something that looks like it should be so simple can get ;0)
Just testing around, the date/time picker functionality is much easier, and follows the logic much more simply.
But I don’t see any way to constrain times to one of 3, 2 hour time blocks (9am-11am, 1pm-3pm, 5pm-7pm). If there are any ideas there, I might just do that instead.
Another idea would be to display just the date portion in the date/time picker. Then next to it create the dropdown with your 3 time block choices just as static choices. Create a submit/save button. Then tie a workflow action to the button that saves the date and time block chosen. So you will have the date picked and time block picked saved with the associated user. This seems to solve what you’re trying to do…