Several concerns

This is why you still get ERRORs…


I already mentioned, that i just have reconstructed about 15% of your whole chaotic code. There are still about 85% to be modified.

You better should give some information about your setup.

-You are using 1x-dataset!
-You are using 2x-DropDowns (“dropdownReg” + “dropdownDep”)
-You are using 1x-databases (“Listepraticiens” + “one more ???”)

Please show your setup.
Please show which databases are involved to your issue.
Please show which DATABASE-FIELDS are involved to your issue.
Please describe what you are trying to achive.
Please describe the flow of how the user would use your dropdowns.
Are you trying to generate a cascade-dropdown? (dropdown-1 fills dropdown-2 by selected item of dropdown-1) ???
Why you are mixing DATASET+CODE-PARTS ?
Show your DATASET-SETUP.

Describe what happens step-by-step, from 0-end.

Example of a detailed step-by-step-description

  1. User has 2 dropdowns in front of him…
  2. User clicks dropdown-1 and chooses an option
  3. Drodown-2 gets filled automatically by the choice-result of dropdown-1
  4. Also all values of dropdown-2 are unique.
  5. Now the user has the opertunity to choose from dropdown-2.
  6. After choice of dropdown-2 → a SEARCH-FUNCTION starts.
  7. …and so on… and so on…

NOW YOUR TURN —> DESCRIBE YOUR SETUP AND THE PROCESS-FLOW —> STEP-BY-STEP as detailed as possible.

Then i will take a look one more time onto your code.

THERE ARE TOO MANY OPEN QUESTIONS!