Select Box Choices

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

Select Box Choices

Post 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:

Code: Select all

script: get("anyfld");
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
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Select Box Choices

Post 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:

Code: Select all

script: get("anyfld")
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.)
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

Re: Select Box Choices

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests