December 14, 2005, 04:54 AM
Code DiggerHandling values from Multi-Select Box from portal
Hi,
We have a portal page which has a multi-select list box. we need to pass all the values selected in this box to our fex file.
Hence i need help on
Q1) How to pass values from portal to .fex (like concatenated string with values separated by a delimiter etc)?
Q2) How to identify each value in code?
Q3) How to handle creation of dynamic variables, as their number depends on number of values passed (concept of Arrays etc). These variables are to be used in the WHERE clause?
Please post an example also.
December 14, 2005, 05:04 AM
Tony ACode Digger,
This is a subject that has been asked before and there are many replies on the subject. Use the find function and search on 'multiple parameters' or similar and have a look through the results to find your answer.
December 14, 2005, 10:57 AM
susannahcd, if, for ex, the parameter name is FRED,
then &FRED0 will be the number of multi-selects the user has chosen.
&FRED1 will the the value of the first one,
&FRED2 will contain the value of the second one, etc.
trouble is, (in 527 anyway, not sure about v7), if the user only picks 1 choice, then &FRED contains that one choice and the variable &FRED0 doesn't exist, so you can't check it to see if its value is 1.
so you have to check to see if it exists first.
To cheat, you might, in your fex, DEFAULT &FRED0 = 0 ; As Tony says, there are alot of threads on this subject, you can search and read where other folks have explained this more clearly.