What options do I have to control a combo-box (or what are my other options?)
I have a Purchasing system, and every step the invoice gets a new status.
However, in certain situations, the superuser can change the status back/forth. However, still with limitations.
So, I have these statuses;
But -e.g.- when the invoice is already Interfaced, I want to disable certain options.
Can I ‘grey out’ certain options (Elements in my domain)? Or can I in some other way build a Combo-box with values build with code? If status = x → show options 1,2,3. Etc.
Any tips regarding this matter?
Best answer by Mark Jongeling
Hi,
It is not possible to grey out certain statuses or let them disappear as domain elements are not subjected to the layout procedure for example to be hidden. You could throw a message in the default if the user selects a status that is not allowed and empty the status accordingly.
Best alternative is by having the statuses as part of you application. Create a status table for this list in your application and make a reference to the Task. That way you have more control over what the user can see or select. This comes with the downside that translations for these statuses then also have to be present in your application. Luckily we do now provide a session variable to obtain the user's language so you can show the correct translation for the user (assuming you have multiple languages. If only English is present in your application, this is not needed)
It is not possible to grey out certain statuses or let them disappear as domain elements are not subjected to the layout procedure for example to be hidden. You could throw a message in the default if the user selects a status that is not allowed and empty the status accordingly.
Best alternative is by having the statuses as part of you application. Create a status table for this list in your application and make a reference to the Task. That way you have more control over what the user can see or select. This comes with the downside that translations for these statuses then also have to be present in your application. Luckily we do now provide a session variable to obtain the user's language so you can show the correct translation for the user (assuming you have multiple languages. If only English is present in your application, this is not needed)
Yes, making the list part of the app is sometimes a good solution. But for short lists with like this example, statuses, I still think a layout proc to disable certain options would be very handy.
I think it’s nicer to grey out an option than to show a message after selecting it that its not allowed.
Yes, making the list part of the app is sometimes a good solution. But for short lists with like this example, statuses, I still think a layout proc to disable certain options would be very handy.
I think it’s nicer to grey out an option than to show a message after selecting it that its not allowed.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.