53
Views
3
Comments
Solved
Disable Certain Values in Dropdown Search

Hi everyone,

I'm trying to disable specific values in a dropdown search list (make them visible but not selectable). Specifically, I want to disable all options related to the department 'All,' so that users can only select from the subcategories.



Is it possible to achieve this using just JavaScript? I've attempted to disable the first record with basic JS but couldn't get it to work. 

For context, I'm using OutSystems Developer Cloud (ODC), but I've attached an OutSystems 11 (O11) OML file since not everyone might have access to the ODC platform.

Does anyone have suggestions on how I can accomplish this?

Thank you.

DisableValuesDropdown.oml
2024-10-12 12-11-20
Kerollos Adel
Champion
Solution

hallo @André Smit  
i use here table users for example , you can depend on group name property and will create header not able to be selected  





2024-03-23 18-16-49
Bryan Villalobos

Hi,


You can have a look at the solution in this post. It uses JS.


Regards,

Bryan

2023-02-06 14-27-11
André Smit

Hi @Bryan Villalobos,

Thanks for pointing me to that thread — I really appreciate it!

Unfortunately, I can't publish the OML, but I was able to inspect the logic. It doesn't seem to work during debugging, as the JSON value shows 'unavailable'. I'm not sure if I made a mistake somewhere, but the disabled options are still selectable, even though the filtering appears to be correct.

DisableValuesDropdown+v2.oml
2024-10-12 12-11-20
Kerollos Adel
Champion
Solution

hallo @André Smit  
i use here table users for example , you can depend on group name property and will create header not able to be selected  





Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.