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 a parameter to an html composer file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Passing a parameter to an html composer file
 Login/Join
 
Guru
posted
I have created an html file using composer. I have several fexes using the same parameter. When creating the file I used a default value for it to use when executing when loading. I what to be able to pass the parameter value to from another fex. How do I do this with 7703? I tried to put in a parameter value such as &CUST_NO and it did not like it.

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Gold member
posted Hide Post
Hi Jay

If the parameters (control) share the same name in all the reports then when executing the reports the parameters should be passed. The key is that the parameters should be named the same. There is a webinar that shows this and can be found at: http://www.informationbuilders...inars/developers/587

If you continue to have problems with this open a case and we can assist you.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Guru
posted Hide Post
The problem is not when I manually enter in the value after the screen loads and I press the run button. That works great. It is when I want to pass the value from a calling fex. For example I have a report with a list of customer names and numbers. I click on the customer number and it calls the customer screen and loads the customer number before the screen displays. Then all of the sub fexes execute using the value that was passed to it.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Platinum Member
posted Hide Post
Hi Jay,
How do you run the "sub fexes"?
If they are called by drill-downs, then you need to pass the variable through on the drill down syntax in the style sheet e.g.
,CUST_NO=&CUST_NO.QUOTEDSTRING ,

If you call the sub fexes from an HTMLFORM, then you need to pass the parameter as a hidden variable in the
<FORM></FORM>  

block.
e.g
<input name="CUST_NO" type=hidden value="!IBI.AMP.CUST_NO;"> 
  


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Guru
posted Hide Post
Passing the name and value pair on the URL would be used if the value is not located anywhere else on the page.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Guru
posted Hide Post
Thanks The !IBI.AMP.CUST_NO did it. As soon as i saw your response, bells and whistles went off.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Gold member
posted Hide Post
Hi Jay

I missed the point. Somehow you retrieved the value from somewhere in a fex and then you are using !IBI.AMP.CUST_NO and that will work. But if you create a control on the HTM page (can be hidden) and populate the control with a table request that gives you one value you can now pass it to the report.

An example would be to populate the control with the value needed:

TABLE FILE CAR
MAX.SALES
BY SALES
ON TABLE PCHOLD FORMAT XML
END

The results will set the control with the maximum sales and then you can assign that value to any control as follows:
function onInitialUpdate(){

//get the value from the control
val MsxSales = IbComposer_getCurrentSelection("MaxSalesControl");

//setCurrentSelection will set the slider1 with the value of edit2
IbComposer_setCurrentSelection("slider1",MaxSales, false);
}


Best of luck with the HTML Composer its a great tool.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report This Post
Platinum Member
posted Hide Post
I'm struggling with almost exactly the same issue. Thanks for the !IBI.AMP tip; I never knew about that.

Using that, I'm getting the value passed from my fex, because I can see it in the HTML source when I run the HTML file. The value in the code is "!IBI.AMP.Load_Id;" and it's getting the parameter when running. Here's the HTML source (notice the value attribute has been set to the passed parameter value):
 <INPUT style="WIDTH: 147px; HEIGHT: 22px" value=C60000220121112080858 type=hidden persistentuniqueid="compUid_1" name="Load_Id">
 


The hangup now is that even though I've bound the hidden control to the outbound parameter on the Parameters tab, the procedure (a graph actually) is not receiving the parameter and is instead using the default value declared in the procedure! I feel like I'm finally so close to solving the fex-to-HTML-to-fex parameter issue, but I'm stuck here!

EDIT: Solved it! I was just playing around a little more and thought maybe having the hidden input and the parameter named the same thing (Load_Id) could possibly be getting something confused, so I gave the input a name and ID of "Load_ID" (capital D) and low and behold, it now works and is passing the parameter to the fex! Hallelujah!

This message has been edited. Last edited by: J.Hines,



Prod: 8.2.0.4 OS:Windows 10 Output:AHTML, Excel 2007+

The life of a designer is a life of fight against the ugliness.
 
Posts: 141 | Location: North Carolina | Registered: August 10, 2012Report This Post
Master
posted Hide Post
J.Hines

I've had a similar issue, but a different solution.

Just run the HTML. Check the source in the browser. Find the input's ID.

Then instead of actually starting the HTML just start a fex with:

-HTMLFORM app/<the name of the actuall HTML here>.htm


and add this to the code below:
userinput_x is the name you found in the source in the browser.
USERINPUT is the name of the variable you want to enter in the input.

-HTMLFORM BEGIN
<SCRIPT LANGUAGE='JSCRIPT'>
document.getElementById('userinput_x').value = '!IBI.AMP.USERINPUT;';
</SCRIPT>
-HTMLFORM END


And you could even replace !IBI.AMP.USERINPUT; with &USERINPUT because it would be resolved anyway.

Good luck


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report 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 a parameter to an html composer file

Copyright © 1996-2020 Information Builders