Focal Point
[CLOSED] Question about how to alert variables with !IBI.AMP.VAR_NAME

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

July 23, 2018, 11:20 AM
Don Garland
[CLOSED] Question about how to alert variables with !IBI.AMP.VAR_NAME
I'd would like to examine the values of variables, seen by an HTML Document (Parameter Page) set by a procedure.

Note: The parameter page is created solely within the GUI. Basically, an HTML Document with several controls(parameters) and an iframe running a procedure.fex The controls populate variables like the one below, via a Requests & Data Sources config of the procedure mentioned above.

-DEFAULT &DATE_SELECTION = 'MONTH'

Scenario:

The user selects the Agency button, the Tasks & Animations runs the PROCEDURE in the iframe and the Agency Chart (shown) runs.

Functionality I'd like to have: I'd like to grab the current state of certain variables, set by the PROCEDURE on the last run, before the refresh, have an alert pop-up so I can see their value. And also use them in my Embedded JavaScript.


Is there any way to do that using the GUI?





Here is the javascript that I am using to try and see the variable;



Here is the message I get;

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
July 23, 2018, 01:42 PM
MartinY
I found strange that your alert does display the literal instead of the variable content.

I use that a lot when validating what the user input in a control and my warning/error message (using alert) have always displayed the content of the variable.

Maybe it's related to the place (function) where the alert has been inserted...?

Have you tried to put the alert in the onInitialUpdate function (or any other one that could be invoked) just to try and see if any differences ?


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
July 23, 2018, 01:48 PM
Don Garland
I use alert on javascript variable all of the time and it works.

I'll move this version around to see if it works in one place or another.

Thank you,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
July 23, 2018, 02:04 PM
Don Garland
I just don't get it. I know I have done this by the book. I should be able to read that &DATE_SELECTION variable. It has a default value.

Something is missing.

Here are the list of variables tied to controls or hidden inputs


-DEFAULT &BUTTON_ID         = '_FOC_NULL'
-DEFAULT &CHART_SELECTION   = '_FOC_NULL'
-DEFAULTH &FROM_DATE     	= '_FOC_NULL'
-DEFAULTH &TO_DATE     		= '_FOC_NULL'
-DEFAULT &TOP_SELECTION     = 10
-DEFAULT &BILLTYPENAME      = '_FOC_NULL'
-DEFAULT &REP_TYPE          = 'COST'
-DEFAULT &HOSPICEORGID      = '_FOC_NULL'
-DEFAULT &HOSPICEGROUPID    = '_FOC_NULL'
-DEFAULT &CONTROL_NAME		= '_FOC_NULL'
-DEFAULT &DATE_SELECTION	= 'MONTH'
-DEFAULT &DATEKEY_MONTH		= '_FOC_NULL'
-DEFAULT &DATEKEY_QTR		= '_FOC_NULL'
-DEFAULT &DATEKEY_CUSTOM	= '_FOC_NULL'
-DEFAULT &OUTPUT_TYPE		= 'SCREEN'  


Here is the request;


Here is the parameter page;



WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
August 01, 2018, 03:40 PM
FP Mod Chuck
Don

If this is still and issue I suggest you open a case with techsupport to debug it..


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 02, 2018, 06:44 AM
Dave
Perhaps you can use the internal ib functions to do the trick?

infocenter


Function: IbComposer_getAllAmpersValues
How to:

Get All Parameter Values
The IbComposer_getAllAmpersValues is used to get the current selected values from all the controls on your page layout. It then takes those values and assembles them as a string that can be added to the end of a URL call. An example of this would be having a REGION control and multiselecting MidEast, NorthEast, and NorthWest. It will assemble these selections as shown below:

®ION=%27MidEast%27%20OR%20%27NorthEast%27%20OR%20%27NorthWest%27
This function can be used in conjunction with the Business Intelligence Portal, where the generated string is appended to all Business Intelligence Portal calls that run reports or charts. This allows the parameter values to affect all portal components, even if new ones are added or existing ones are removed at runtime.



_____________________
WF: 8.0.0.9 > going 8.2.0.5
August 02, 2018, 02:57 PM
Don Garland
quote:
Perhaps you can use the internal ib functions to do the trick?


Dave, I took a look at IbComposer_getAllAmpersValues and although handy, unless I'm doing something wrong, it doesn't find any variable that is not part of the requests or added manually to the parameter screen.

The more I read about Auto-prompt and discovery, the more I think that is what it is. But even discovery only finds other procedures that have the same variables that the current procedure has.

What we need is, a new kind of variable, manually added to the parameters tab in the Designer. We would configure the variable as an external reference and the event we want to collect the current value. If it were possible, I would use it to find out what state a widget is in, that has multiple drill downs to itself. The widget starts out at the current month, the user selects a button on the widget that changes the time frame to quarter, refreshes the iframe and the widget values change.

But, the parameter screen doesn't know that the widget is displaying QTR. If I could determine that, I may update certain controls or hide controls, etc.

If it were possible.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL