January 14, 2008, 02:51 PM
ErneyMulti Select drop down
For some reason i thought this attached code would pass multiple select values to a fex but im only returning the first value selected.
Any idea what im doing wrong?
<SELECT id=listbox1 style="HEIGHT: 100px" size=3 name="CATEGORY_CODE" multiple size=3 operation="OR">
<OPTION value=FOC_NONE selected displaytext="Select All">Select All</OPTION>
<OPTION value='A' displaytext="A">A</OPTION>
<OPTION value='B' displaytext="B">B</OPTION>
<OPTION value='C' displaytext="C">C</OPTION>
<OPTION value='D' displaytext="D">D</OPTION>
</SELECT>
I would assume if A and B are selected the value i should be passing in "Category_code" would be "A OR B" but its only passing "A"
January 14, 2008, 03:32 PM
dcjThis could depend on what the where clause is in your fex. Can you post the fex's where clause.
Example where for multiple
WHERE CATG_CDE EQ &listbox1.(OR(FIND CATG_CDE IN CAT_TABLE)).listbox1.;
Example where for single
WHERE CATG_CDE EQ '&listbox1';
January 14, 2008, 03:34 PM
dcjAh; I just saw you have a different name than the ID. The above example should have CATEGORY_CODE instead of listbox1
Example where for multiple
WHERE CATG_CDE EQ &CATEGORY_CODE.(OR(FIND CATG_CDE IN CAT_TABLE)).CATEGORY_CODE.;
Example where for single
WHERE CATG_CDE EQ '&CATEGORY_CODE;
January 14, 2008, 04:53 PM
Tony AErney,
When passing multiple values from a combo box, the URL produced will have multiple values of the variable. In your instance you would have /WFServlet?........&CATEGORY_CODE=A&CATEGORY_CODE=B
WF interprets this for you and provides the following variables at runtime -
CATEGORY_CODE = A
CATEGORY_CODE0 = 2
CATEGORY_CODE1 = A
CATEGORY_CODE2 = B
You will find many posts in ths forum regarding suggestions on how to read and process these multiple values.
T
January 15, 2008, 03:20 AM
GamPTo add a little tip for debugging:
If you wish to see what is being passed on to your fex from the html-page you could do a '-? &' on the very first line of your fex, followed by a -EXIT.
This will show all &vars being active at the moment of issueing the command, and thus will show you exactly what's been passed on.
Hope this helps.