Ask Reuben


Is there a maximum number of items allowed in a COMBOBOX?

Why is my form so slow to load?

When you click on a COMBOBOX to view the list of items to select from, that is fast.  The reason it is fast is because the items have already been sent from the back-end to the GUI client.  There is no database activity or values being sent across the network at this time because it has already happened.

Nothing is free and the price in this instance is that any database activity to determine the items available and network activity to send the list items to the front-end takes place on or before when the window/form is visible.

If you have a COMBOBOX with hundreds or thousands of entries to select from, the database activity to select the hundreds or thousands of items from the database, and the network activity to send the hundreds or thousands of items across to the front-end has occurred by the time the form with the COMBOBOX is visible.  This activity is what can slow down the initial rendering of a form/window, multiplied if you have more than one COMBOBOX in the form.   That activity is in most cases wasted activity as the user might never expand the COMBOBOX, or if they do, they might not scroll down to the bottom of the list.

My personal rule of thumb is that a COMBOBOX should not have more than a screenful worth of items, so your design standard should be something in the region of a maximum of 25 to 50 items.  Any more than that, then the appropriate widget to use is either EDIT/BUTTONEDIT + COMPLETER attribute for auto-completion,  or a BUTTONEDIT with a zoom window such as fgl_zoom.

Four Js does not impose a limit, a hard limit of 50 would run into trouble if in the USA a 51st state acquired statehood !  Some like to use COMBOBOX for list of countries which can be around 200 and we would not want to stop that.  It is disappointing when analysing support cases and receiving large GUI logs, to see a COMBOBOX with thousands of items being sent across the network.  In such cases I believe the wrong widget is being used, and that you should have a design standard to make sure that the number of items in a COMBOBOX is not excessive.