Focal Point
[SOLVED] Maintain populate combo boxes dynamically

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

May 06, 2008, 06:53 PM
brjohnson
[SOLVED] Maintain populate combo boxes dynamically
Hi everyone,

I was wondering if anyone could explain how(or point me in the direction of documentation) to dynamically select items from a stack to populate a combo box. Also, would it be possible to edit the string prior to populating the box.

Thanks in advance

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


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
May 06, 2008, 10:40 PM
Waz
What you need to do is create asubset of your information into another stack, then point the combo box to the new stack.

Some documentaion is here for FOR NEXT or for STACK COPY.

If you use STACK COPY make sure you INFER the stack to make it the same as the source stack.

You can then use a parameter to control what is retrieved and put into the stack with the WHERE clause.


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!

May 07, 2008, 02:23 AM
Alan B
Bryan

If you want to manipulate what goes into your combo box, you can use something like:
.
Declare comboBoxItem/Stack Of a0;
.
.
j=1;
Repeat sourceStack.FocCount; i=1;
if soureStack(i).field 'passes my criteria' begin
  comboBoxItem(j) = 'manipulate' sourceStack(i).fieldName;
  j=j+1;
  endbegin
Endrepeat i=i+1;
.



Alan.
WF 7.705/8.007
May 09, 2008, 02:43 PM
brjohnson
Thank you both it works great now!


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML