Page 1 of 1
Select Box Choices
Posted: Fri Jun 13, 2014 11:28 am
by robhathome2
Hi
When trying to get a second select box to restrict based on the values of a first check box (having the applyProperty of "select box" in the onchange of the first to the second) I was unable to get the below entry in the choices parameter working:
After much hair pulling I came across
http://www.profoundlogic.com/forum/view ... eter#p4859. This works - so was I trying to do it wrong originally or is there a feature?
Rob
PUI Version 4.8.4
Re: Select Box Choices
Posted: Fri Jun 13, 2014 1:13 pm
by Scott Klement
I'm not completely sure that I understand the question.
Are you saying that you originally were setting the 'choices' property of a select box like this:
And this didn't work, but then you changed it to work like this and it worked:
Code: Select all
applyProperty("myid", "choices", get("anyfld"));
Did I get that right? I'm not sure if I'm understanding that part.
And your question is "why does the first method fail, and the second method succeed?" -- is that what you're asking?
Or, is this a database-driven select box (instead of using 'choices' as I mention, above.)
Re: Select Box Choices
Posted: Fri Jun 13, 2014 2:45 pm
by robhathome2
Hi Scott
Sorry - I knew I'd made it a convoluted explanation.
Within the Database-Driven Selection section for the 2nd select box I had the choices selection criteria set to COMPANY='02' and LEVEL=? and I had the choices parameter value set to script: get("selectbox1");
On the first select box I had the onchange set to applyProperty("selectbox2", "field type", "select box");
The onchange triggered the second select box reload. The choices parameter value on selectbox 2 just didn't seem to pick up the value.
Does that make more sense?