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] How to pass amper variable to HTMLFORM and then to fex

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to pass amper variable to HTMLFORM and then to fex
 Login/Join
 
Member
posted
This question has been asked before, but the response did not include a sample of code...so...

In WebFOCUS MRE 7.7.02 we have a fex in domain1 that does an -HTMLFORM to an htm file which is located in domain2. The HTMLFORM executes multiple fexes to populate drop down boxes and then when the user clicks on the Submit button a final fex is executed. These three fexes are located in domain2 as well.

The fexes in domain2 are using SQL pass thru and therefore are setting the DEFAULT_CONNECTION to a valid data adapter connection name.

We now want to set up a domain3 to process the same HTMLFORM and the same fexes found in domain2; however we want to use a different value for the DEFAULT_CONNECTION. I think we can set up amper variables in the first fex which calls the -HTMLFORM, and then set up an !IBI.AMP.VARNAME in the htmlform to pass to the three fexes.

I think we would include a -SET &VARNAME = 'ORACLEADT'; in the domain1 fex;
We would include !IBI.AMP.VARNAME somewhere in the htm code which is located in domain2;
We would change code in the three fexes to ENGINE SQLORA SET DEFAULT_CONNECTION &VARNAME
We then would include a -SET &VARNAME = 'ORACLEEUT'; in the domain 3 fex. Notice the value is slightly different for &VARNAME.

Can someone confirm my logic? Also, can someone provide the actual syntax I would use to add the !IBI.AMP.VARNAME in the htm code? Can I just insert it anywhere in the code? Do I need to use any other code around it?

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


WebFOCUS 7.7.02
Window 2003 /32bit
 
Posts: 23 | Registered: April 04, 2007Report This Post
Master
posted Hide Post
Sounds like you are on the right track.
quote:
can someone provide the actual syntax I would use to add the !IBI.AMP.VARNAME in the htm code?

To pass an amper variable from a fex, to the next fex, via a -HTMLFORM web page, we use hidden text boxes, in the form the user is submitting.

For example:
 <input type="hidden" name="IBIMR_domain" value="!IBI.AMP.DOMAIN_NAME;">   




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Member
posted Hide Post
is this what your talking about?

-SET &DANNY = 'YAY';
!IBI.AMP.DANNY;


WebFOCUS 7.6
Windows, All Outputs

 
Posts: 15 | Location: Houston , TX | Registered: May 08, 2012Report This Post
Member
posted Hide Post
Thank you David, that is exactly what I was asking for. I assumed I would have to use an input type of hidden, but we all know the dangers in making assumptions. :-)


WebFOCUS 7.7.02
Window 2003 /32bit
 
Posts: 23 | Registered: April 04, 2007Report This Post
Guru
posted Hide Post
Penny,

You may want to look at GLOBAL variables rather than using !IBI.AMP.VARNAME;.

In your situation there is no real advantage in creating a hidden control - except to maybe have it visible in the source HTML.

Rather than -SET &VARNAME = 'ORACLEADT'; try -SET &&VARNAME = 'ORACLEADT'; and then ENGINE SQLORA SET DEFAULT_CONNECTION &&VARNAME

&&VARNAME will be avaialble to all FEXes used by that user while their Java session is open and removes the need for a HTML page just to hold the variables.


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Member
posted Hide Post
I had considered using a global amper variable but decided the hidden variable was the better option in this case. Thank you for the suggestion.


WebFOCUS 7.7.02
Window 2003 /32bit
 
Posts: 23 | Registered: April 04, 2007Report 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] How to pass amper variable to HTMLFORM and then to fex

Copyright © 1996-2020 Information Builders