Focal Point Banner

As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at for further assistance. Reference the community FAQ to learn more about the community.

Focal Point    Focal Point Forums  Hop To Forum Categories  Performance Management Framework (PMF)    [technique] creating a parameterized gadget

Read-Only Read-Only Topic
[technique] creating a parameterized gadget

I'm building a gadget that is similar to the Measures - Rolling 5 periods report, in that it has dates in the ACROSS. However, the Gadget Class builder does not seem to allow turning an ACROSS into a parameter.

To work around this, I built an HTML form that binds a combobox to the &SORTACROSS variable and then fills an iframe with the gadget on load and when the user pushes a button. I made a gadget_[fexname].fex in my PMF_CUSTOM folder that has one line: -HTMLFORM [html file name].htm

I had to do a -SET &PMF_IS_GADGET='Y'; in the gadget that gets called, because all this monkeying around causes it to think it's not a gadget anymore.

Now I have a gadget that has a combobox and a button at the top. The combobox passes TIMELEVEL01_VALUE, TIMELEVEL02_VALUE and TIMELEVEL03_VALUE to the &SORTACROSS variable, which makes the report group the data into Year, Month or Week (custom time dimension) along the top.

In a sense, I've duplicated the preferences window for gadgets to allow a user-selectable ACROSS field. There is one difference though, and it's significant:

-If you have a Rolling 5 Period report, and your Default Time Level is monthly, it shows five months. If you use the Time Dimension Tree and click on the current year, it will show you the last five years. It has changed the grouping from monthly to yearly AND has changed the date range from five months to five years
-My gadget always uses the Default Time Level, regardless of the &SORTACROSS I pass it. So, since my DTL is set to Weekly, I get five weeks for a date range, regardless if I choose to display year or month or week

Seems to me that PMF must have two switches; one for the date range and one for the date grouping. I wonder if anyone can shed some light on specific variable names or methods to handle this?



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

-WebFOCUS 8.2.01 on Windows
Posts: 318 | Location: Los Angeles, CA | Registered: November 15, 2005Report This Post
posted Hide Post
Hi Again,

I've made some amazing breakthroughs on this topic. I now have a dashboard that contains a gadget that calls an HTMLFORM, which has controls for Time Ranges and Time Levels. The html file calls a gadget, and passes variables that alter the incoming variables that the gadget uses to control the Time Range and Time Level. The end result is a gadget where the user can choose a time range and the time grouping level independently.

The process flow is like this: PMF -> Dashboard -> Gadget -> -HTMLFORM -> html file with controls -> fex that sets incoming variables and includes a pmf report template

There are plenty of applications for this sort of thing beyond time controls. I think an interaction between filters.fex and some dimension value controls ought to be useful to many clients. I'm going to play with that next, so that the user will be able to filter a multi-measure report by time and specific dimension values. This is similar to the Dimension Tree control, except without the limitation of Time OR a different Dimension value. I'll update with my progress at a later time.

Here is the end-to-end process that's got me to my current point:

1. Create this procedure in your PMF_CUSTOM folder. Do NOT name it gadget_[fex name].fex:


2a. Create a new html file in the HTML Layout Painter / Composer
2b. Add an iframe
2c. Add a combobox and call it TIMERANGE
2d. Add a combobox and call it TIMELEVEL
2e. Add a command button and have it run the fex from step 1 in the iframe
2f. Make the iframe run the fex from step 1 on load
2g. Give the TIMELEVEL control three static values: TIME_LEVEL01_VALUE (display Year), TIME_LEVEL02_VALUE (display Quarter) and TIME_LEVEL03_VALUE (display Month)
2h. Load all Time Ranges and Time Range Abbreviations into the TIMERANGE control with PMF's javascript library:

Include this somewhere in the html HEAD:
<SCRIPT language=javascript src="/approot/mainstreet/pmf_lib.js"></SCRIPT>

Include this in the window_onload() function:
var cgicommand   = getWFScriptName() + "?" ;
var theFEX  = buildFEX("TIME_RANGES", "TIME_RANGE_NAME", "A50", "TIME_RANGE_ABBR", "A10",null, null, null, null) ;
var commobj = new ibihttpxml(cgicommand, theFEX) ;

Now you can run the HTMl file and you will see that the TIMERANGE control is filled with all the Time Ranges from your Manage tab. This is dynamic, so any new time ranges will flow through to this control. If you run the report now, you will see the selected values displayed in the heading of the simple car file report. Try changing them a few times and make sure they are properly bound to the variables. They didn't bind properly when I tried to associate the button and iframe to a pre-built PMF gadget, so I used a car file report as a work-around to get this going. The next step is turning that sample report into a gadget.

3. Replace the contents of the fex from step one with this code:


-SET &REPORT_TITLE='Measures Across Time';

4a. make a new fex in your PMF_CUSTOM folder and name it gadget_[fex name].fex
4b. add this line only:
-HTMLFORM [name of HTML file from step 2].htm

5a. in PMF, add a new gadget class
5b. use the gadget fex from step 4 as the source, set the size and leave everything else as default
5c. add the gadget to a dashboard
6. run the dashboard and enjoy!



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

-WebFOCUS 8.2.01 on Windows
Posts: 318 | Location: Los Angeles, CA | Registered: November 15, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  Performance Management Framework (PMF)    [technique] creating a parameterized gadget

Copyright © 1996-2020 Information Builders