Hiding or disabling options from dropdown menu

I need help in removing or displaying an option in my drop down menu, whenever a criteria is met. So I have a process wherein users can select an appointment window from a list in a dropdown menu. We user an option set to define each of the window in the list (e.g. 8am - 10am; 10am to 12pm, etc.). To prevent users from overbooking within a window each day, I would like to control the number of appointments that can be made within that window daily. That is, whenever appointments booked within a window reaches a certain number, I would like for the that window (in my option set) to either not be displayed on the list of available options that day…or (somehow) the system does not allow them to select that window or progress further. And if necessary, the system could display a message letting them know that the window is no longer accepting appointments.

Any advice/tips will be greatly appreciated.

Hi there, @darrenchapin129… if you want to remove the options from the dropdown (which one could argue is a better user experience than allowing a user to select an option and then telling them it’s not a valid option), here is one way you could do it.

Note that this example assumes you have a data type where you are saving appointments, and that data type has a field that is tied to the option set of available windows.

On your option set of available windows, add an attribute that is the maximum number of appointments that can be scheduled during that window.

Then, filter the dropdown’s choices source as follows.

Finally, add the following constraints to the search for appointments.

Hope this helps, even if it’s just food for thought.

Best…
Mike

Thanks a lot for the breakdown; the screenshots are really helpful for step-by-step application. I have a question: In the 3rd step, where do I do the “Search for Appointments” function…do I do it on the dropdown or create a separate search on a text element to pull appointments?

The search for appointments is the second part of the constraint in the second screenshot. So, in other words, you can do it on the dropdown.

Ok I got it now. But the issue is that the dropdown’s “choices source” already has a dynamic data and its filtered. Its not allowing me to select a new “Type” to add constraints. I just want to clarify that we’re on the same page as to where I need to put these constraints.

I’m not sure what you are asking at this point, but the constraints I am showing in the last screenshot are associated with this search.

If you need more help, share some screenshots of what you have done, and I’m sure we can figure it out.

Also I’d like to give you some additional information on the app that may provide more perspective: The app itself is a car valet app, where users can schedule a pickup and drop off. The appointment windows are more like “pickup windows”. So we are trying to limit the number of pickups we can do within a specific window on each day. Therefore, I’d like to be able to decide a number of pickups that users can schedule within a specific window (E.g. 10 pickups). Therefore the entire goal here is to set that restriction so that once that number is reached, the option will no longer be available to users for that day. And we will do the same for each of the window we have in the dropdown.

Ok will do now

The process starts here, where they chose the pickup and drop off addresses and then select the date and time (pickup window)

The above is are the original setup I had. But based on your tips, I updated it to this

When I try to add the additional constraints you had in Step 3 of your tips, I get this:


As you can see, I am not able to add the constraints you recommended.

Please let me know if I confused you with these screens. Lol! Still learning the ropes.

First, have you added the attribute to your option set? I’m not sure why it shows “deleted” in your filter constraint.

Second, to add the other constraints we have been talking about, click on this search and add the constraints on the resulting dialog.

Done. This is what I now have:

So I ran the preview and its not showing the options in the drop down now. This is what I get when the drop down is clickedb:

If you want to send me a link to your editor (privately), I can take a look at it.

Just did.