Focal Point
[SOLVED] Limiting a Dynamic Dropdown

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

September 04, 2014, 03:00 PM
Lynsi
[SOLVED] Limiting a Dynamic Dropdown
I am trying to create a dynamic dropdown which will query a list of our production master files. I need this to be dynamic so that if a new table is added it will automatically populate the report.

The issue I am having is that I only want the master files beginning with DW in my dropdown.

Any thoughts on how to exclude values from a dynamic dropdown? A basic hold file does not work.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7 and WebFOCUS 8
Windows, All Outputs
September 04, 2014, 03:14 PM
Cyril Joy
How are you currently populating the dropdown? Can you write a javascript on load of page to control the dropdown?


Regards,
Cyril Joy.

WF Production 8008 on Linux.
September 05, 2014, 04:09 AM
Håkan
Lynsi,

what about this?

dir /b DW*.mas > masterlist.txt

Create a Master file for masterlist.txt. Maybe add a DEFINE in the master file to extract the filename without the .mas.

TABLE FILE masterlist
SUM FST.filename
BY filename
ON TABLE PCHOLD FORMAT XML
END


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
September 05, 2014, 07:26 AM
Alan B
Try using SYSTABLE:
TABLE FILE SYSTABLE
SUM NAME
BY NAME
WHERE NAME LIKE 'DW%' OR 'dw%'
ON TABLE PCHOLD FORMAT XML
END



Alan.
WF 7.705/8.007
September 08, 2014, 09:31 AM
Lynsi
We are currently populating the drop down via the gooey tool, directly from the table.

Example using Car File:

TABLE FILE CAR
PRINT
CAR.ORIGIN.COUNTRY
CAR.COMP.CAR
WHERE CAR.CARREC.MODEL EQ &MODEL.(OR(FIND CAR.CARREC.MODEL,CAR.CARREC.MODEL IN car)).MODEL.;
END

What I am trying to do based on the above is exclude values from the filter above, so for example I may want to only include values that begins with 2002, but I need the dynamic dropdown in case additional 2002 values are added to the data warhouse so that those values will be automatically picked up.

Thank you


WebFOCUS 7.7 and WebFOCUS 8
Windows, All Outputs
September 08, 2014, 01:56 PM
Håkan
Lynsi, what about a year drop and chaining to your current list and select only the 2002 models. You can have multiple controls chaining to same list, eg. country, car, year.

Regards
Håkan


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
September 08, 2014, 02:48 PM
MartinY
Hi Lynsi,

I've tried to answer your request with this :

TABLE FILE CAR
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
WHERE CAR.CARREC.MODEL CONTAINS '2002';
ON TABLE HOLD AS HLD FORMAT FOCUS
END

TABLE FILE HLD
PRINT
     HLD.SEG01.COUNTRY
BY  LOWEST HLD.SEG01.CAR
WHERE HLD.SEG01.MODEL EQ '&MODEL.(FIND HLD.SEG01.MODEL,HLD.SEG01.MODEL IN hld).Model.';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
ENDSTYLE
END


But as you mentioned it seems that the gui doesn't want to display the data properly even if the HLD file does only includes MODEL having 2002 in his description.

But if you're using the following you will have your list :

TABLE FILE CAR
PRINT CAR.CARREC.MODEL
BY CAR.CARREC.MODEL
WHERE CAR.CARREC.MODEL CONTAINS '2002';
ON TABLE PCHOLD FORMAT XML
END


Then you can assign a control in a HTML page to it with a parameter that will pass the selected value to your fex and have the result you want.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
September 09, 2014, 07:14 AM
Lynsi
The XML file with the HTML layover works prefectly. Thank you greatly for the assistance!


WebFOCUS 7.7 and WebFOCUS 8
Windows, All Outputs