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     [Closed] Choosing the database environment via HTML in portal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] Choosing the database environment via HTML in portal
 Login/Join
 
Gold member
posted
Hi,

I'm currently configuring our environment to allow users to choose to which database they'd like to execute their reports. As we are using the portal/view functionality, I'd like to set a dropdown list in the banner area containing the different databases.
End goal: Whenever the user chooses a database - all subsequent reports execute on that db

What I've done so far is:
- set the global variable via edasprof:
-SET &&G_ENV = 'INT'
- created an html file with dropdownlist via composer to set the global variable via an included fex:
  
  ...
  function onInitialUpdate(){
	var list = document.getElementById('combobox1');
	if('DVL' == '!IBI.GLB.G_ENV') list.selectedIndex = 0;
	if('INT' == '!IBI.GLB.G_ENV') list.selectedIndex = 1;
	if('UAT' == '!IBI.GLB.G_ENV') list.selectedIndex = 2;
  }
  function combobox1_onchange(ctrl) {
  document.getElementById('form1Submit').click();
  }
  ...
  <FORM ... id=form1 onsubmit="OnExecute(this);return false;" ...>
  <SELECT ... onchange=combobox1_onchange(this) ...> 
  <OPTION selected value=DVL noinput="0" displaytext="DVL">DVL</OPTION> 
  <OPTION value=INT noinput="0" displaytext="INT">INT</OPTION>
  <OPTION value=UAT noinput="0" displaytext="UAT">UAT</OPTION> 
  </SELECT> 
  <INPUT ... id=form1Submit ... type=submit ...>
  </FORM>
  <![CDATA[-*focexectool
  -SET &&G_ENV = &ENV;]]>

- created a seperate fex to set the connection details via the global variable:
  -GOTO &&G_ENV
  -DVL
  ENGINE SQLORA SET CONNECTION_ATTRIBUTES DWH DWDVL/user1,pwd1
  ENGINE SQLORA SET CONNECTION_ATTRIBUTES ODS DSDVL/user2,pwd2
  END
  -INT
  ...
  END
  -UAT
  ...
  END

Now for the inevitable questions:
- how do I go about putting the html-file in the banner area of the portal? (can I copy-paste? whereto?)
- what is the 'scope' of the engine command? (per WF-server, WF-client or browser session?)

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


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report This Post
Platinum Member
posted Hide Post
The way I resolved this many years ago was to create separate Synonyms for each table in each database. In that case, the databases were in different geographic locations, so we used a 2 letter location prefix (MI for Miami etc) for each table.

Usage went something like this, where &LOV_PRE = 'MI" and passed in from the launch page


 
-SET &MYTABLE = &LOC_PRE || 'CAR';

TABLE FILE &MYTABLE.EVAL
PRINT 
    COUNTRY
    CAR
END
-RUN


NOTE: You have to take Particular care to ensure that ALL tables in ALL databases are always EXACTLY the same schema for this to work. If one location / database makes a schema change and that is not replicated across ALL databases, and the MFD's updated accordinly, eventually your reports will crash due to FORMAT and / or USAGE errors when the .mas file no longer matches the table or your reports are using functions that require the input format to be specified.

It ain't pretty, but it worked.


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
 
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005Report This Post
Virtuoso
posted Hide Post
You should be able to achieve something similar with app folders -- keep the synonym names identical across the app folders, and just adjust the app path to reflect the selection.

That avoids dialog-manager intrusion into the DEFINE and TABLE code, and can allow them to be or remain GUI compliant.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
If this is BI Dashboard, then you can edit the banner.html under the worp/worp_html/word{number}.

I would suggest adding a new one, then edit to your hearts content.

This just becomes a template to use.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thank you all for the suggestions.
I ended up setting the attributes of the connection depending on the global variable I defined via "_site_profile = -INCLUDE setconnection.fex"
Upside: I didn't need to modify any of the reports, applications or master files and connection remains valid for entire time when logged on
Downside: doesn't work for report caster (separate includes needed in reports)

Also, instead of using the banner area, I rather used the portal functionality to show a block that remains visible at all times...
Reason: For using the banner area, I needed a 'pure' html page, but I wanted to include WF-variables to set default values...

Lastly, I used the following two elements to call a fex from the html-page:




Regards,
Peter


Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
 
Posts: 59 | Registered: April 23, 2012Report 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     [Closed] Choosing the database environment via HTML in portal

Copyright © 1996-2020 Information Builders