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 community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     !IBI.GLB - does this really work? [SOLVED]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
!IBI.GLB - does this really work? [SOLVED]
 Login/Join
 
Silver Member
posted
Summary:
Rumor has it that there is a way to get the values of &&VAR and &VAR variables defined in a report .fex file in the HTML page that displays this report. I can't get !IBI.GLB.XYZ to work for global variable &&XYZ.

Details:
We don't create HTML pages by hand, we use the HTML Composer in Developer Studio - this way we get for free the input controls that are needed to collect the user input that drive the SQL stored procedure call that retrieves the data to be displayed.

Some of our customers don't need some of these input controls and therefore we'd like to hide them (make them invisible using JavaScript). For this, the HTML page somehow needs to determine whether a control needs to be visible, and hence it needs to "know" (i.e. has access to) the value of certain (global) variables that are set per customer and that define what variant of the report they get.

Wherever I put !IBI.GLB.XYZ it simply does not get replaced by the actual value. I have tried the name field of a hidden input and of a text box; I have tried to put it in a text box (HTML input); I have even edited the HTML itself and put it in a span element. No luck. Just wasted time and nothing to show for it.

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


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Expert
posted Hide Post
Do you have the semi-colon at the end? It is required:

!IBI.GLB.XYZ;

If so, and, it still doesn't work, try all in lower-case:

!ibi.glb.xyz;

If it still doesn't work, IBI has said that in later releases, they tightened the code. Since you say you are on WebFOCUS 8, you'll have to open a case as there are very few that are on that release...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Try putting your html inside a fex
-* this is a fex
-SET &somevar = something ;

-HTMLFORM BEGIN
<HTML>...
...your html goes here
</html>
-HTMLFORM END

..then whereever you are referencing your existing html page, just change it to run this fex. you can do all sorts of magic this way




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Silver Member
posted Hide Post
Aha. I was naively thinking that if I compose an HTML page with the HTML Composer (for convenience and development speed) and in the process refer to a .fex file that runs the actual report, and I put the !IBI.GLB.* in the HTML, WebFOCUS would automagically substitute the actual values in the HTML.

But no.

Apparently it only works if I write all the HTML myself. This is not impossible - people used to do it all the time, ten years ago. WebFOCUS then takes the HTML text, substitutes actual values for !IBI variables and inserts the report(s), and pumps the resulting HTML to the client browser.


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Expert
posted Hide Post
'Apparently it only works if I write all the HTML myself" - false statement.

You can create an HTML file using the HTML Composer GUI and then refer to it via a HTMLFORM file.htm statement in a fex. You can then embed variable values with !IBI.AMP.varnamel; and !IBI.GLB.varname1;

The only proviso to this is that Information Builders states in the document "Designing a User Interface for a Web Application With the HTML Composer Version 7 Release 7.03 (DN4501) Developing Reporting Applications, Version 7 Release 7.03", HTML Composer GUI created pages is not supported: Chapter 5 - Managing Flow of Control in an Application > Enhancing an HTML Web Page With a Procedure > Enhancing an HTML Web Page With a Procedure -

quote:
Note: HTML Composer design time is not meant to be used with this construct and if used,the tool may not work as expected and will not be supported.
If you use separate HTML files, you cannot use Dialogue Manager commands and variablesin the file. However, the WebFOCUS escape sequences, described in Including Variables inan HTML Web Page on page 377, can be used.


I know they work, but they're not supported. I will carefully examine the document because HTMLFORM is mentioned all over it, including examples - and then challenge the statement...

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
not quite right, marc
what i'm suggesting you do is invoke the webfocus server before you invoke your webserver... the webserver reading the html only.
if you do that, you can do all sorts of magic pre-processing, create your own custom dropdown lists for select statements, and use !IBI.FIL.MYFIL; to then invoke them in the html code that you copy and paste from the tool into the body of your launch fex.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Silver Member
posted Hide Post
quote:
Enhancing an HTML Web Page With a Procedure

Thanks Francis and Susannah!

In my own words:

A short .fex file that calls the generated HTML file (that contains a hidden HTML element with value !IBI.GLB.CUSTOMER_TYPE; ) indeed works - it has the proper actual CUSTOMER_TYPE value (as defined at the start of this .fex file) in the HTML element:

-SET &&CUSTOMER_TYPE = 'SomeType';
-HTMLFORM /WFC/Repository/Common/.../MyReport.htm

So with a little JavaScript I can hide superfluous controls (based on the CUSTOMER_TYPE).


Caveats:

In WebFOCUS 8, unlike http://ecl.informationbuilders...e/source/topic58.htm suggests, the filename need not be in uppercase letters. However, it must be the full path of the file.
I would not recommend copying and pasting the HTML text; not only because it's more work, but because the generated HTML sometimes contains the "&amp;" string which breaks everything (WebFOCUS interprets it as a variable instead of some HTML character Frowner).

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


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
Expert
posted Hide Post
This is the second time today someone is talking about copying/pasting code generated by HTML Composer into a fex. I don't know why people think this is necessary -what's wrong with -HTMLFORM file.htm ?

Or did I misunderstand your comment about "copying and pasting the HTML text"? If you leave the HTML code in an HTML page, you wouldn't have the "generated HTML sometimes contains the "&" string which breaks everything (WebFOCUS interprets it as a variable instead of some HTML character Frowner)" issue.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
either way
conceptually, it might have been easier foryou to grasp the wfrs->tomcat->wfrs if visuallizing the html code beneath the focus code.
regardless, you don't need a global variable set in your focus code, you can use a local one.
-SET &mything
rather than
-SET &&mything
and reference it with !IBI.AMP.MYTHING; rather than !IBI.GBL.MYTHING;




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Silver Member
posted Hide Post
Moderator Kerry asked me to mark this resolved and closed.


WebFOCUS 8.0.0.8, Windows 7
 
Posts: 36 | Location: Portland, OR (USA) | Registered: October 11, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     !IBI.GLB - does this really work? [SOLVED]

Copyright © 1996-2020 Information Builders