Focal Point
Passing parms in - update

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

August 05, 2009, 03:19 PM
Bob Jude Ferrante
Passing parms in - update
This just came in from a consultant...
We'll put the response in next...

I have been poring over Section 3 of the Developer’s Guide. This section is called Controlling PMX’s Behavior and is on pages 42 to 47 of the version of the guide I have. I think this is the relevant documentation to do what I am trying to do.

The problem I am having is that is very unclear in the doc into which fexes the various code should be placed. As far as I can tell, the code to be inserted somewhere is:

-SET &GADG_DIM_NAME01 = 'LOCATION' ;
-SET &GADG_DIM_NAME02 = 'TIME' ;
-SET &GADG_DIM_NAME03 = etc…
...
-INCLUDE GADG_DIM_PARMS_MULT

And
-DEFAULT &LOCATION_LEVEL01_VALUE = ‘ ‘;
-DEFAULT &LOCATION_LEVEL02_VALUE = ‘ ‘;
...
-SET &DIM_NAME = ‘LOCATION’;
-SET &DIM_VALUE = &LOCATION;
-INCLUDE gadg_dim_parms
...
-SET ®N = IF &LOCATION_LEVEL01_VALUE NE ‘ ‘ THEN
TRUNCATE(&LOCATION_LEVEL01_VALUE);
-SET &WHOUSE = IF &LOCATION_LEVEL02_VALUE NE ‘ ‘ THEN
TRUNCATE(&LOCATION_LEVEL02_VALUE);


I have tried every combination including these two blocks of code in the gadget and in the detail report. I am getting errors but I don’t know if that is because I don’t have the code properly placed.

Other questions:
1. Are there other things that must be taken into account if the drill down is from a PMF report running as a gadget vs. one not running as a gadget?

2. Does this work the same whether the dimension values are selected from the dimension trees vs. drilling down on the report? Page 46 states that you click on the reports tree to pick a warehouse. This is why I am asking this question.

3. Are there any working examples of all of this in any of the PMF demos?

Thanks,


Bob Jude Ferrante
Director of Business and Development
WebFOCUS Performance Management
Bob_Ferrante@ibi.com
917-339-5105

I'll take any questions about PMF - business or technical - anytime!

August 05, 2009, 03:20 PM
Bob Jude Ferrante
If you use GADG_DIM_PARMS_MULT (5.1.2 and up) you should not use GADG_DIM_PARMS. It’s either/or. GADG_DIM_PARMS_MULT is newer code and handles multiple dimensions in one pass. That’s why there’s an 01, 02, etc after the dim name parameters you’re passing. So use that one even if you’re trying to get parms for only one dimension, just so you get used to using it.

Please make sure to include A_DEFAULTS and A_SCORECARD at the top of your operational report. If those are missing then neither GADG_DIM_PARMS_MULT nor GADG_DIM_PARMS will work.

What you get out will be amper vars [dimension_name]_LEVELnn_VALUE that represent the dimension filter broken out to more easily work when doing a WHERE against the separate hierarchy fields in your report (e.g., what you might have as BY fields, or which might be “top level” filters you aren’t even showing).

Example. If you were doing two dimensions (LOCATION and PRODUCT) you’d have code like this:
  
-INCLUDE A_DEFAULTS 
-INCLUDE A_SCORECARD
...
-SET &GADG_DIM_NAME01 = 'LOCATION' ;
-SET &GADG_DIM_NAME02 = 'PRODUCT ;
-INCLUDE GADG_DIM_PARMS_MULT
-SET ®N = IF &LOCATION_LEVEL01_VALUE NE ‘ ‘ THEN TRUNCATE(&LOCATION_LEVEL01_VALUE);
-SET &WHOUSE = IF &LOCATION_LEVEL02_VALUE NE ‘ ‘ THEN TRUNCATE(&LOCATION_LEVEL02_VALUE);
-SET &PROD_TYPE = IF &PRODUCT_LEVEL01_VALUE NE ‘ ‘ THEN TRUNCATE(&PRODUCT_LEVEL01_VALUE);
-SET &PROD_NAME = IF &PRODUCT_LEVEL02_VALUE NE ‘ ‘ THEN TRUNCATE(&PRODUCT_LEVEL02_VALUE);
...
TABLE FILE FOO
...
WHERE REGN EQ ®N.QUOTEDSTRING ;
WHERE WHOUSE EQ &WHOUSE.QUOTEDSTRING ;
WHERE PROD_TYPE EQ &PROD_TYPE.QUOTEDSTRING ;
WHERE PROD_NAME EQ &PROD_NAME.QUOTEDSTRING ;


This is assuming you want to use the top two levels of LOCATION and the top two levels of PRODUCT as your filters.

Hope this helps.


Bob Jude Ferrante
Director of Business and Development
WebFOCUS Performance Management
Bob_Ferrante@ibi.com
917-339-5105

I'll take any questions about PMF - business or technical - anytime!