How to create dynamic dependency between 2 fields?

How to create dynamic dependency between 2 fields?

Hi!

I am trying to create dependency between 2 fields using form rules and script.

First I will have to select the site like HU, RO, IT
And then I have a dropdown pick list called "Clinic" to list all of the options that is corresponding to the site.

For example when you choose site "HU"
You can only choose from the "Clinic" dropdown menu options that contain "HU" in the beginning like "HU AB" or "HU NCA" and hide all other options like "RO AB" "RO NCA"

I am trying to achieve this with a script that first removes all the option from Clinic, then adds the options that contain the "HU" keyword. 

How can I achieve this?

                  New to ADSelfService Plus?