Restricting selection of multiselect fields and cascading fields using Behaviour

Hi,
I am looking for Scriptrunner code using Behaviours to restrict selection of two multiselect fields and one cascading field in Jira Server.
Basically, we want to control 4 selection of field values.

Lets say we have multi select fields called “Fruits” and “Vegetables” and a cascading field with parent selection “Counties” and child selection “States”, we want to restrict field values of “Counties” and “States” based on selection of “Fruits” and “Vegetables”.

Is it possible to acheive this kind of logical selection?

If yes, what is the code for such an logical selection.

Hi Team,
Can anyone help me on above query?

Thanks in advance

Hi Troy:

You could try asking this question on the Adaptavist Atlassian Community Forums. There are also recurring ScriptRunner-related Webinars that allow you to submit questions ahead of time. If the timing is right, you could submit your question to one of those.

Cheers,

Ken