Populating a dynamic dropdown box - based of another dropdown box

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Populating a dynamic dropdown box - based of another dropdown box

woodsaa
Hi hoping someone can assist,

I have seen many posts about this issue however they have left me more
confused than where I started.

I have a dropdown box called "Specialty"  & a dynamic dropdown box called
"Referral declined reason".

I would like it so that when one of the list items in "Specialty" is
selected the "Referral decline reason" dynamic dropdown box is populated
with reasons specific to each specialty.

e.g:

Radiology options:

"X-ray not accompanying patient"
"Test results inconclusive"

Medicine options:

"Patient did not attend clinic"
"Insufficient evidence"

Surgical options:

"Surgery waiting list to long"
"Patient cancelled surgery"

Where do I tell the dynamic dropdown box to pull the above options from?

test-eform.txt <http://discuss.orbeon.com/file/t375768/test-eform.txt>  

Hope that makes sense.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1580448187455-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Populating a dynamic dropdown box - based of another dropdown box

Alessandro  Vernet
Administrator
Hi,

In your case, I wouldn't use a Dynamic Dropdown for "Referral declined
reason". Instead, I would create 3 Static Dropdowns, for the Radiology
options, Medicine options, and Surgical options, and use a Visibility to
have only 1 of those 3 dropdowns shown at a given time, based on the value
selected in Specialty.

You'll let me know if this works for you.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1580499364989-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Populating a dynamic dropdown box - based of another dropdown box

woodsaa
Hi Alex,

Thanks for the reply.

I was trying to avoid this as we have over 30 specialties. This just means I
need to create 30 different dropdown boxes.
Another issue was that we need to populate these responses into a print
letter template and with 30 controls it would not display well formatted.

My solution is to have a hidden calculated field which will pull the value
from the selected specialty using if statements. And then populate the print
letter template with the value from the calculated value so as to fix the
formatting dilemma.


Regards,
Aaron

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1580682546464-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Populating a dynamic dropdown box - based of another dropdown box

Alessandro  Vernet
Administrator
Hi Aaron,

Got it, so I'd suggest you create a file that looks like the
`reasons-decline.xml` linked below, and place it in your `config` directory,
along your `properties-local.xml`. Then, in Form Builder, configure a
Dynamic Dropdown as shown in the `dynamic-dropdown-properties.png` linked
below. You can see what this gives at runtime in `running.mp4`. And for
reference, I've attached the source of the form in `form.xml`, which will
work in 2019.2.

You'll let me know if this works for you.

reasons-decline.xml
<http://discuss.orbeon.com/file/t119778/reasons-decline.xml>  
dynamic-dropdown-properties.png
<http://discuss.orbeon.com/file/t119778/dynamic-dropdown-properties.png>  
running.mp4 <http://discuss.orbeon.com/file/t119778/running.mp4>  
form.xml <http://discuss.orbeon.com/file/t119778/form.xml>  

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1580929531977-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Populating a dynamic dropdown box - based of another dropdown box

Alessandro  Vernet
Administrator
Hi Aaron, did you get a chance to try the technique described in my previous
message, using a single dynamic dropdown? If so, did that work for you?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1581556097066-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet