Select field

Hi All,

I am having trouble in dealing with 3 select fields simultaneously .

I have three select fields say A,B,C. Based on the selection in select field 'A' a corresponding new list will appear in select field 'B' and then based on seletion in select field 'B' a new list will appear in select field 'C'.

for the first time the sequence is working fine, but for the second time if I am changing the selection in select field 'A', I am getting a warning message as,

Selected value for field 'B' does not match any of the matched values

I am displaying values through 'allowedValues' property name. For every new selection it is not displaying the new list, it is trying to append with the old list and getting the warning message.

Is there a way to resolve this issue.

Please give some ideas.

Thanks in advance.

[887 byte] By [dortmund_developera] at [2007-11-27 8:52:44]
# 1

Can you post your code? That would help pinpoint what changes to make.

Based on what your description, I think you'll want to do something like this:

1) Define a variable to contain the allowed values set for each list.

2) When the conditions of Set A would force set B to change, execute a block of code which sets Set B to <null/> and set the variable for Set B's allowed values to the new list.

Jason

jsalleea at 2007-7-12 21:08:48 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2

Hi,

Thanks for the reply.

The code I am using,

<Field>

<Display class='EditForm'/>

<Field name='location'>

<Display class='Select' action='true'>

<Property name='title' value='Location'/>

<Property name='allowedValues'>

<rule name='GetLocations'/>

</Property>

<Property name='nullLabel' value='--Select--'/>

</Display>

</Field>

<Field name='Server'>

<Display class='Select' action='true'>

<Property name='nullLabel' value='--Select--'/>

<Property name='title' value='Server Name'/>

<Property name='allowedValues'>

<block trace='true'>

<rule name='getServerName'>

<argument name='location' value='$(location)'/>

</rule>

</block>

</Property>

</Display>

</Field>

<Field name='Share'>

<Display class='Select'>

<Property name='title' value='Share Path'/>

<Property name='nullLabel' value='--Select--'/>

<Property name='allowedValues'>

<block trace='true'>

<cond>

<eq>

<ref>Server</ref>

<s>XYZ</s>

</eq>

<rule name='SharePaths1'/>

<rule name='SharePaths2'/>

</cond>

</block>

</Property>

</Display>

</Field>

</Field>

I will try your recommendations.

Thanks

dortmund_developera at 2007-7-12 21:08:48 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3
Hi,I have encountered a similar problem earlier. I was able to resolve this by setting the property 'allowOthers' to true.<Property name='allowOthers' value='true'/>Thanks,Swatz.
Swatza at 2007-7-12 21:08:48 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4
Hi,Thanks for the reply.If I set property ' allowOthers='true' ', it will just append the values to the old selection. but I don't want in that way, for every new selection from the select field 'A' a new list should populate in select field 'B'.Thanks
dortmund_developera at 2007-7-12 21:08:48 > top of Java-index,Web & Directory Servers,Directory Servers...