Todd Van Valkenburg Posted March 28, 2023 Share Posted March 28, 2023 I am creating a portal using AppStudio. We are not using Designer yet. The portal has 4 tabs. Each tab has a unique Html page created using AppStudio and a unique fex. The Html page is the parameter page that allows the user to select all the parameter and then hit a submit button which runs the fex on the page. Many of the &variables are shared across all 4 tabs.Ideally when the submit button is pushed and the fex is run on a tab, the &variable values will be passed/shared with the other tabs. So when a user navigates to another tab, the &variable values will be prepopulated with the values from tab that the user was just on.I am struggling with finding a way to consistently make this work. There are many attempts that I tried but none work well. So wondering if you have a methodology that works well for you.I made sure the &variable names that are shared across tabs (across fexs) have the same name.What I have tried (applies to all html pages created via AppStudio):1) Using javascript. When submit button is pressed, runs javascript form1Submit_onclick where the code looks like this:function form1Submit_onclick(ctrl) {refreshReports();}function refreshReports(){var name = this.window.name;parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF, name);}1a). I also tried this variation in the above javascript (but I would expect the above is what I need)parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF,name, null, parent.BipIframeInterface.AMPERS_PAGE_ONLY);2) In Tasks and Animation, there is a refresh action. I added this to the submit action in each html page. 2a) I tried this as a solo action. And as an additional action that occurs after the javascript mentioned above. And tried it before the javascript mentioned above.Thanks for any suggestions! Link to comment Share on other sites More sharing options...
David Beagan Posted March 29, 2023 Share Posted March 29, 2023 Did you create the 4 tabbed portal with the portal tool in WebFOCUS.It is the one you access from the welcome page by clicking Other then selecting Collaborative Portal. Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted March 29, 2023 Author Share Posted March 29, 2023 Exactly. Link to comment Share on other sites More sharing options...
Solution David Beagan Posted March 30, 2023 Solution Share Posted March 30, 2023 The JavaScript you have posted looks like what was done in the early 8.x releases before the Refresh BI Portal feature was built in to HTML Canvas. I put together something that seems to work without custom JavaScript.I create a Collaborative Portal with a Banner the left side containing the common parameter Region. The HTML page in this banner was built with App Studio HTML Canvas with the REGION parameter having Target Type Refresh BI Portal (All pages of portal). When a different REGION is chosen, the page triggers a Refresh BI Portal.When the portal is run, the chosen Region is sent to the HTMLs of both tabs, which in turn passes the Region to the report. I have a change management package I can email to you that contains all of this. It is all built off of ggsales data in WF 8.2.07, so you should be able to run it and examine it on your end. Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted March 30, 2023 Author Share Posted March 30, 2023 David - Thank you so much. Can you use the Message service within the Community to send me the cm? Link to comment Share on other sites More sharing options...
David Beagan Posted March 30, 2023 Share Posted March 30, 2023 OK, I just messaged you with the attachement. If anyone else would like it, let me know. Link to comment Share on other sites More sharing options...
Todd Van Valkenburg Posted March 30, 2023 Author Share Posted March 30, 2023 David - Your example really helped!For me, these were the key changes to make this work in my case:1) I did not need any additional javascript beyond what is auto-magically created when you create a new HTML page.2) Properly use the Task & Animations. Instead of having a submit button, I learned that you can have a trigger type = "Selection Changed". I applied this to all drop downs on the form. This then triggered two actions: a) Refresh1 with a target of "Refresh BI Portal" across All pages of portal (this magically shares the parameter values); b) run the external procedure which reruns the report in the same iframe. So the submit button can be removed in this case.3) The portal tab can contain one object (the html page). The html page has both the parameter controls and the report. What I original did was separate the html controls from the report. This is more streamlined.Anyway, thanks again David! Link to comment Share on other sites More sharing options...
David Beagan Posted March 30, 2023 Share Posted March 30, 2023 You are welcome.I am happy that you found it useful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now