Dynamic Dropdown Help

Hello Everyone, and thanks for your time in advanced.

I currently have two dropdowns setup. Dropdown 1 is a list of locations for our company. and Dropdown 2 is a search of a database that has location and department names. The choices for dropdown 2 is a search in this table which location matching dropdown 1’s choice. this is working in other parts of my website already and is fine. but on this specific page when i use auto-bind feature. i cannot select a default field to modify. it lets me do this when the dropdown is static choices. is this not an option for dynamic choices?


I must assume you’re using auto-binding on dropdown 2(?)

It’s actually to be expected that when you’re using auto-binding, you don’t get to define the default value. Auto-binding must do that because the element’s value is bound to the thing’s field. The default is therefore, by definition, coming from the field it is bound to.

I’ll be watching this topic before jumping in with a solution because my solution may be more complicated than it should be. Hoping someone else has an elegant answer. If you don’t get an answer by Saturday, ping me and I’ll let you know how I handled this kind of thing.

how about try n do do a search for “list of company” for drop down and the constraint should be location/department’s company = copany in database location and department.

i think it will be easier if u change the database structure by putting a field which is a list of things in the same database as company and list out the location and department in 2 diff fields. just an idea.

Maybe i wasnt too clear with my explanation.

I have a main table for employee info (this is for an HRM solution im making). In that employee info for each record (employee) is a field that lists their location and department. (EX Location: NJ, Department: Field or Location: NJ, Department: Office) In the form i have where you set the employee’s location and department is two dropdowns, location and department. The location dropdown is a static choice of locations because it is very simple (EX NJ, FL, CA, AZ etc) however the department dropdown has to be dynamic beacuse depending what location you choose, the departments are different. so NJ has different departments then FL etc. so i have the dropdown for department set as dynamic choices, doing a search to a table i made that has two columns ( location and department) so if NJ Location is chosen it searched that table for all departments with the criteria of location=location dropdown. This all works perfect in the form for this hrm. however on the employee page, after the employee is created, i have auto bind fields where you can go in and change the information. that is where this setup isnt working. i can create a test example or something like this if anyone is interested but its pretty simple to re-create. i dont feel like this should cause a problem but this is the first time i use dynamic choices with auto binding.

This topic was automatically closed after 70 days. New replies are no longer allowed.