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] Call the same procedure passing different hidden values

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Call the same procedure passing different hidden values
 Login/Join
 
Member
posted
Hi all!

I need to do create a HTML with two graph element where each graph call the same procedure X (reference existing procedure). The procedure X receive one parameter. I could create a hidden value to pass to X using the composer. But, what I couldn't do, was create two different hidden values to pass to the two distinct graph element. As the procedure has one parameter, the same hidden value is passed to all procedure calls, even though each chart needs its own value.

Is there a way to differentiate hidden variables to each procedure call in the same HTML page?

Best regards,

Christian

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: August 14, 2014Report This Post
Master
posted Hide Post
masdeval,

yes you can do this. The simplest and easiest way to do this is to make sure that your variable in each report is unique between them. say &var1 and &var2. When using the HTML composer it should prompt you whether you want to create an input for each one. Just select both of them to hidden and you should be good to go. Also, you can add new input elements to the html and using the parameter tab in the html composer, you can associate those hidden inputs to variables in your report. If you are new to this process, I would recommend using the tool for as much of this as possible as there is a lot of xml that gets generated and if you don't understand what is going on with the xml, it is very easy to break things.

Good luck


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
Hi Eric. I think the situation you described is not the same as mine.

There is only one HTML page with two Graph element. Each graph reference an existing external procedure. The external procecure receive the parameter X. I can create a hidden variable to set the parameter. When i do that, the two procedure call booth receive the same value. I couldn't create two hidden variables to set two different values to the two different procedure call.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: August 14, 2014Report This Post
Master
posted Hide Post
Sure you can create two different variables, and then handle it on the WebFOCUS side. in that scenario you would send one for one request and the other for the other request. but short of doing that, you would have to create a javascript function that updates the hidden input, executes the first graph, changes the variable and then executes the second graph.

Another thing you could do, if you look at the FORM call, you will see the OnExecute(this) command in the OnSubmit. You could call a function in the OnSubmit of the FORM that updates the input before it fires off the execute function. That would be another way do it.

here is an example of an anchor tag where I do that. The FORM element should have something similar in the onSubmit you can change.
 <a id=excel href="javascript:toggleExcel();OnExecute(form1);toggleExcel();" class="sp-help_link"  requests_list="5">  


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Member
posted Hide Post
The composer creates just one OnSubmit function (as it creates just one form with one hidden variable even I having inserted two graph element). So, there is only one execution of the OnSubmit and how can I make distinction of values passing to the first procedure call and the second?

The composer only creates two forms with two buttons when I choose the option "do not create controls" in the "reference existing external procedure" dialog box. But in that case the hidden variables are not cretaed.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: August 14, 2014Report This Post
Master
posted Hide Post
Masdeval,

I think I understand your question. I've wanted to do the same.

for example:
You have -one- graph.fex
And within the same HTML you want to call it twice.
Once with &GRAPHTYPE = 'WEEKBAR' to go in frame1
and
Once with &GRAPHTYPE = 'YEARLINE' to go in frame2.

...and you don't want to make graph1 and a graph2 because they're are almost the same.

My solution:

GRAPH_WEEKBAR.fex:
-SET &GRAPHTYPE = 'WEEKBAR';
-INCLUDE app/GRAPH.fex



GRAPH_YEARLINE.fex:
-SET &GRAPHTYPE = 'YEARLINE';
-INCLUDE app/GRAPH.fex


And use GRAPH_WEEKBAR.fex for frame1
and use GRAPH_YEARLINE.fex for frame2

In this way you call pass all other parameters. Use a different value for one specific parameter.
AND have the real graph code in only one place.

g'luck


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Member
posted Hide Post
Thank's Dave.

This way will work. The problem is that I will have several HTMLs each calling the procedure several times. What I precisely whant to avoid is have to write to many procedures to treat this issue. Something like two forms with two hidden variables submiting twice to the same procedure. But seems that I won't have other option.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 6 | Registered: August 14, 2014Report 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] Call the same procedure passing different hidden values

Copyright © 1996-2020 Information Builders