Focal Point
Multi Select drop down

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9351060662

January 14, 2008, 02:51 PM
Erney
Multi 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"


WF 7.1.7- Windows XP
January 14, 2008, 03:32 PM
dcj
This 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';


wf: 7.6.4
App. and reporting server: UNIX/AIX 5.3
January 14, 2008, 03:34 PM
dcj
Ah; 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;


wf: 7.6.4
App. and reporting server: UNIX/AIX 5.3
January 14, 2008, 04:53 PM
Tony A
Erney,

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



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 15, 2008, 03:20 AM
GamP
To 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.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988