Focal Point
[SOLVED] Populate Maintain combobox options from a fex.

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

January 11, 2010, 03:35 PM
jwilson
[SOLVED] Populate Maintain combobox options from a fex.
I've looked around the forums, but can't really seem to find what I'm looking for so hear it goes. I'm trying to find a way to populate the options for a combobox with the values from a column in a focus report. I'm able to execute a fex to populate an HTML object, but can't seem to do the same to populate a combobox. If I attempt to use the variable in the stack that works for an HTML object in the combobox options it doesn't work. Any ideas?

Thanks in advance,

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


WebFOCUS 7.6.5
Windows Server 2003
January 12, 2010, 04:19 AM
Alan B
The populating of a combo box from a fex is pretty standard.

The report run has to have ON TABLE PCHOLD as the output format.

The columns in the report have to match the stack being used in the INTO STACK.

case getparms
Declare var1/a10;
.
.
var1 = 'ENGLAND';
.
.
parmStack.country/a10;
parmStack.car/a16;

stack clear parmStack;

  exec myparmfex from var1 into parmStack;

endcase

fex:
TABLE FILE CAR
BY COUNTRY
BY CAR
WHERE COUNTRY EQ '&1'
ON TABLE PCHOLD
END


The focexec can use AS 'NAME' in the request with ASNAMES=ON.

As a real example on your desktop, just run an Update Assist against the car file with combo boxes, look at the maintain generated and the listfill.fex provided. The maintain also has good code to set the default combo box selected entry, and is a good learning tool for maintain code in general.


Alan.
WF 7.705/8.007
January 12, 2010, 09:37 AM
jwilson
Thanks Alan. Works great. I was using ON TABLE PCHOLD FORMAT HTML. Also, thanks for the tip of using the update assist to generate code for examples.

Thanks Again,


WebFOCUS 7.6.5
Windows Server 2003
January 12, 2010, 10:13 AM
Maintain Wizard
One more note to add:

Many of my demos use the Movies file. When I want to retrieve all of the categories, I only want to 10 unique names and not all 60 rows. To do that I use:

TABLE FILE MOVIES
PRINT DST.CATEGORY
ON TABLE PCHOLD
END
-RUN

This way my combo box gets populated and I don't have to remove an duplicates.

Mark