Coldfusion 8
I inherited an application and am trying to maintain and improve it... hit a snag today.
I have a multi-select box that is not displaying what I expect. The values come from a ColdFusion grid which is based off a database query.
Here is the code for the select - does not work - nothing is selected:
<cfselect name="USER_IDS" multiple="true" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
</cfselect>
Now if I change the multiselect to a single select like below - it takes the first item in the field list (from the grid) and selects it in the drop down.
<cfselect name="USER_IDS" multiple="false" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
</cfselect>
Or if I assign a variable like this and use the multi-select code it seems to work as well.
testlist = "22,26";
...
<cfselect name="USER_IDS" multiple="true" queryposition="below" selected="#testlist#" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
</cfselect>
I have displayed the value of "User_IDs" in the grid and in the data entry part of the screen to see values of: 22,26
to make sure that wasn't my issue.
Do grids and multiselects require something additional? Any advice on how to resolve?
I inherited an application and am trying to maintain and improve it... hit a snag today.
I have a multi-select box that is not displaying what I expect. The values come from a ColdFusion grid which is based off a database query.
Here is the code for the select - does not work - nothing is selected:
<cfselect name="USER_IDS" multiple="true" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
</cfselect>
Now if I change the multiselect to a single select like below - it takes the first item in the field list (from the grid) and selects it in the drop down.
<cfselect name="USER_IDS" multiple="false" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
</cfselect>
Or if I assign a variable like this and use the multi-select code it seems to work as well.
testlist = "22,26";
...
<cfselect name="USER_IDS" multiple="true" queryposition="below" selected="#testlist#" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
</cfselect>
I have displayed the value of "User_IDs" in the grid and in the data entry part of the screen to see values of: 22,26
to make sure that wasn't my issue.
Do grids and multiselects require something additional? Any advice on how to resolve?