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.
I am trying to set a variable as global from a list box selection in the first tab of my html & access it in filters through out my fex's in other tabs in a SINGLE browser session.
I am having multiple tabs (tab control) in a single html & each tab defaults to a html of its own & each htm has like 4 frames running graphs/reports. I can access my set global var in all the procedures of the first tab , but not in the other tabs.
I've verified that the ibi_persstant setting is set to yes.
I've referred through the documentation resources & previous FP posts & everything seem to be indicating that my global var should last through out the browser session. What am I missing here? Please suggest!This message has been edited. Last edited by: FP Mod Chuck,
So the users will always open and run the procedure in the first tab before going to any of the other tabs? It would be interesting to -DEFAULT the global variable before opening your first HTML page and then check it's value after running the procedure in the first tab and opening one of the other tabs.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Hi Dan - Thanks for writing in. Yes, the users would always start/go to the first tab to change the client (& set the value for global var) I've checked by defaulting it in the procedure before the first tab gets loaded it. the default val does get picked up in the procs of the first tab & even change when the value is set again. it. when i go to the second tab...the default value is seen but not the changed val. I am also reloading the second tab on click to verify it's not picking up the value from the first tab.
After thinking about it, each HTML launch page probably does open a separate session (a new call to the WebFOCUS servlet). You could try passing the value of your global variable to subsequent tabs by adding it to the HTML form that calls the WFServlet (some variation of the sample below) in those other tabs. A hidden local variable (name of your chosing) can be created with its value set to the global value, which will be passed to the servlet along with any other values from the HTML page.
That's true Frank, but as the profile gets executed as the first part of the FOCUS session the "global" variables get set each time a new fex is executed, so whilst we perceive them as persistant .......
Kal,
You might have to look at setting local cookies and their retrieval.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
I've tried adding the hidden variable as Dan suggested along with trying to assign the changed global var back in the server profile...but still not able to get it to work yet.. Thanks Tony for your indication- Though hoping for another route, I've started to look at taking the cookies retrieval path. will post back the progress.. Thanks for the help.
Hi Kal, I've had success saving amper variables as session variables. Session variables are set and reset in site.wfs. They can be used in focexecs and passed to maintains. Some of my past posts to focal point contain this technique.
I must run now but can detail this technique, if you are interested.
Please advise.
Nick
WebFOCUS 7.7.03 & 8.0.7 Windows HTML, Excel, PDF, etc. Also, using Maintain, etc.
In my application, we post the userid of the person entering the system from the portal to WebFocus. A focexec is also called from the post statement. Since all focexecs call site.wfs, I have an "if" statement identifying the first or subsequent pass of site.wfs.
The first time sets the session variable and subsequent passes retrieve the session variable. In each cases, a focexec is called setting the local variable to a global variable using the statement "-SET &&ID = '&ID.EVAL';".
The global variable can now be used in a focexec.
In a Maintain, COMPUTE a variable as follows: "COMPUTE ID = IWC.GetAppCGIValue("ID");" and test for a null value. If null, the values was not passed.
Hope this helps.
Nick
WebFOCUS 7.7.03 & 8.0.7 Windows HTML, Excel, PDF, etc. Also, using Maintain, etc.
Hi Kal, I faced a similar issue regarding dropdowns and passing the selected value to some other fex. i worked for sometime and realized that if i store the value from the dropdown to a global variable,and call the global variable in some other fex which uses that value to filter and stuff like that.it just works fine. I dont know whether this will help u. I tried sending it through forms but with no luck.
My global variable persists even if i close the browser and open it back. it still holds the value i selected last time.
I found that explicitly calling -EXIT in a fex procedure erases session-global variables. I consider that a bug and have opened a case. Just in case anyone else runs into this.
We were using an && variable to pass on some session data through drilldowns, but sometimes the && variable was suddenly not set anymore. At first we suspected session time-out, but it was happening too soon for that. Replacing a few -EXIT statements with -GOTO :END and a -:END label at the end of each procedure resolved the issue.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
The -EXIT in the procedure terminates the procedure and prevents the global variables from being written back to the .tmp file in your webfocus\temp folder associated with your browser session.
WF 4.3 - 8.2 Windows\Unix
Posts: 3 | Location: Dallas | Registered: November 14, 2012