Focal Point
[SOLVED] IbComposer functions

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

November 03, 2015, 08:00 PM
vaayu
[SOLVED] IbComposer functions
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

-Pawan

This message has been edited. Last edited by: vaayu,


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
November 03, 2015, 08:45 PM
Rifaz
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.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs: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.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
November 03, 2015, 11:09 PM
vaayu
Found the problem, I needed to adjust what I need to select which is basically everything from my subset.



var dflSel = IbComposer_getComponentById('sublist');
IbComposer_setCurrentSelection('mainlist', dflSel, false);



If anyone is interested in saving the bookmark for all avaialable IbComposer functions, here it is

http://infocenter.informationb...source%2Ftopic54.htm

Thanks for helping as always.

You guys Rock!!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************