Hello Gurus, I found these two great functions today and I'm to use it for my HTML listbox. I have this listbox ("mainlist") that I need it to preselect some rows based on a fex so I created another listbox ("sublist")(hidden) with that fex.
Here's what I tried so far function onInitialUpdate() { dflSel = IbComposer_getCurrentSelection('sublist'); IbComposer_setCurrentSelection('mainlist', dflSel, true); }
I was hoping line 2 in the function will set some selections based on line 1 but it only one item stays selected. What I'm I doing wrong ?
Please let meknow
-PawanThis message has been edited. Last edited by: vaayu,
Define the variable and it will work, btw.. why dont you use 'Send display value' option ? function onInitialUpdate() { var dflSel = IbComposer_getCurrentSelection('sublist'); IbComposer_setCurrentSelection('mainlist', dflSel, true); }
-Rifaz
WebFOCUS 7.7.x and 8.x
November 03, 2015, 08:45 PM
Waz
Have you checked to see what is returned from the get ?
The IbComposer_setCurrentSelection expects an array for the second parameter.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
November 03, 2015, 10:27 PM
vaayu
Thanks guys, it looks like the first one is prepopulated which stayed selected in my sublist. I want everything in that hidden listbox to be selected in my mainlist. Please advise.