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     [SOLVED]Passing the name of an amper variable to HTMLFORM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Passing the name of an amper variable to HTMLFORM
 Login/Join
 
Guru
posted
Hi,

I have some amper variables that can potentially be very long values. Since this can be a problem for a drilldown, I am thinking of putting the value into a global variable. Since I'd like the global variable name to be unique, I was thinking that I'd pass the name of the global variable which I create dynamically to the HTMLFORM so that the HTMLFORM can know which global variable to look at for the data it needs. However, I am unable to think of a way to get the HTML to process the global amper by first processing the local amper for the name.

I was of course thinking of things like:

In the HTML: !IBI.GLB.!IBI.AMP.AMP_NAME;;

In JS:
var amp_name = '!IBI.AMP.AMP_NAME;';
var glb_amp = '!IBI.AMP.'+amp_name+';';

But these don't work...

Any suggestions?

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


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Virtuoso
posted Hide Post
ChannyS,
You can't do it this way. Reason is that the !IBI... things get translated before the page gets sent to the browser, thereby effectively disabling your js attempt. Also your html attempt will not work, because nesting these things is also not allowed.
But since you already have the name of the variable as well as the contents of the variable, you could just use those, couldn't you? Use the name of the variable to name an hidden input item, and populate it with the contents of the variable.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
GamP -

I understand how I can create the hidden input element dynamically based on the name of the variable I pass in. I'm just not sure how I can set the value - I'm stuck with the same problem - !IBI.GLB.[what do I put in here since this is dynamic]?

Thanks


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Can you tell us why you "have some amper variables that can potentially be very long values"? Could you not assign a number to the value and pass that instead?


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
Guru
posted Hide Post
comma delimited list of long id's


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Virtuoso
posted Hide Post
Cache them in a file on the server keyed to the token, have the DD fex retrieve them based on the token.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Very good idea Jack.

The FOCCACHE feature is very handy for drilldowns:

Foccache: Persistent Directory for Caching Files


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
Guru
posted Hide Post
Thanks, I will look into it.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Guru
posted Hide Post
I finally got around to working on it. It works great. Thanks for the idea.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Guru
posted Hide Post
I want to be able to query using this file held in the FOCCACHE using syntax such as:

  WHERE [I]fieldname[/I] IN  [I]theFoccacheHoldFile[/I]


When I put that in, I get the following error:

FOC226) FILEDEF OR ALLOC MISSING FOR EXTERNAL FILE

Do I actually have to create a FILEDEF for this file? If so, is it really doable considering that it is in some FOCCACHE directory that is created dynamically for each user?


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
I've only used FOCCACHE once and that was for a TABLE FILE. Because of the special nature of FOCCACHE, files in there may not be available for WHERE IN FILE. If you have a Master for that file, I'd try the following:

Create a new HOLD file via
 
TABLE FILE theFoccacheHoldFile
PRINT * 
ON TABLE HOLD AS H001
END

and use this new file for the WHERE IN FILE statement.


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
Guru
posted Hide Post
Fabulous!

Thanks!!


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report This Post
Expert
posted Hide Post
Chanah,

Did that suggestion work or did you find some other solution - just interested in what worked.


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
Guru
posted Hide Post
Yes, it was your suggestion that worked. The FOCCACHE feature does create a .MAS with each of the .FTM files that it creates so this worked very well.

Thanks again.


Release: WebFOCUS 7.6.8
OS: Windows
Output formats: HTML, PDF, Excel, csv
 
Posts: 256 | Registered: July 21, 2008Report 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     [SOLVED]Passing the name of an amper variable to HTMLFORM

Copyright © 1996-2020 Information Builders