Focal Point
[CLOSED] IBI.AMP works but IBI.GBL does not work

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

January 06, 2011, 06:19 PM
Dan Pinault
[CLOSED] IBI.AMP works but IBI.GBL does not work
Hi there - Can anybody 'splain this to me?

-SET &&YRLESSFIVE = (&DATEYY - 5);
-SET &&YRPLUSFIVE = (&DATEYY + 5);

-SET &YRLESSFIVE = &&YRLESSFIVE;
-SET &YRPLUSFIVE = &&YRPLUSFIVE;

-HTMLFORM BEGIN

<SPAN>How come these GLOBAL variables do not resolve?</SPAN><BR>
<SPAN>!IBI.GBL.YRLESSFIVE;</SPAN><BR>
<SPAN>!IBI.GBL.YRPLUSFIVE;</SPAN><BR>
<BR>
<SPAN>But yet if I set these LOCAL variables equal to the GLOBAL variables it works!</SPAN><BR>
<SPAN>!IBI.AMP.YRLESSFIVE;</SPAN><BR>
<SPAN>!IBI.AMP.YRPLUSFIVE;</SPAN><BR>

-HTMLFORM END

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
January 06, 2011, 06:26 PM
Waz
Is there a reason why you can't use &&YRLESSFIVE and &&YRPLUSFIVE


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 06, 2011, 07:43 PM
N.Selph
Try !IBI.GLB.YRLESSFIVE; (etc)
(not GBL !)


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
January 07, 2011, 07:33 AM
Dan Pinault
Waz, I want to use the values in a JavaScript function. Yes, yrlessfive and yrplusfive can be declared in JavaScript but I have other global variables I want to use this way too.


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
January 07, 2011, 12:25 PM
M Meagher
!IBI.GLB.YRLESSFIVE it is. I just tested it.
January 07, 2011, 01:25 PM
Dan Pinault
Darn syntax! Geez, shouldn't the system know what I meant?!? Wink
Thanks for the extra set of eyes.

OK - here is the scenario I'm using this in:
The global variables are defined either in the server profile or the group profile (depending on the variable).
I built a simple HTML page in the Composer that just shows these variables as text objects.
If I run the HTML page by itself the variables do not resolve.
However, if I create a fex that has
 -HTMLFORM app/webpage.htm 
then the variables resolve.

Does this mean I need to launch the web page from a fex if I want to use these variables or is there some similar mechanism that can be used in the HTML page itself?

Thanks again!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
January 07, 2011, 01:38 PM
Tom Flynn
Hi Dan,

Yes, that is exactly how we architect. All programs are done on the server. All calls to these programs are from MRE.

So, we have:
1 place to modify a program
Calls from MRE invoke all the .wfs script files which may include security fex's.
-MRNOEDIT -INCLUDE app_folder/PROGRAM.FEX
-MRNOEDIT -HTMLFORM app_folder/PROGRAM.HTM

There are many other reasons we do this.

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe