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.
MarciaDrummond, Not sure what you are asking? Do you mean the 3 parameters need to be passed to another report or does the other report open in your launch page? If it is a drill down to the report you should be able to capture the &VARS and pass to the next report.
Let me clarify, I need to get the aforementioned variables from the URL line. I am guessing that there is some sort of JavaScript that can query the URL line to do this, but I have not been able to find it.
The launch page contains 3 parameters (1 text box and 2 calendar controls); a Submit button and an iframe. Once the user has entered the location number and chosen the date range, they click Submit and the report populates the iframe. Additionally, I need to capture the user ID and their email address which is available in the URL line.
WebFOCUS 7.73 Windows, Unix, AS/400 (iSeries) HTML, PDF, MS Excel (including templates), HTML Active Reports
Unfortunately, those 2 variables are not listed when the amper variables are queried. They may be available to the html page and I would like to use some sort of scripting to parse the URL into its individual components so that I can get the values of the user ID and email address.
I envision a parsing of the URL line and selection of the 2 variables placed into individual hidden components on the page. When the user clicks Submit, all 5 variables will be passed to the focexec (location number, start date, end date, user ID, and email address)- I just do not know how to do it.
WebFOCUS 7.73 Windows, Unix, AS/400 (iSeries) HTML, PDF, MS Excel (including templates), HTML Active Reports
The launch page was not deployed by me. I used the Composer to create the launch page and created a one-line fex to call the HTML page using -HTMLFORM. I gave the name of the focexec to the owners of the web site and they made it available via a link on their website.
My understanding is that the site is using Lotus Notes and the variables VAR1, USERID and MYEMAIL are coming from Notes. That being said, I now have an HTML page with those values in the URL and I would like to make them available to my procedure.
WebFOCUS 7.73 Windows, Unix, AS/400 (iSeries) HTML, PDF, MS Excel (including templates), HTML Active Reports
If you enter this URL in browser- 1. It should invoke "statrpt" procedure from "proddir" application. 2. It should pass values for "VAR1","USERID" and "MYEMAIL" variable to startrpt procedure.
This means that, above variables are automatically available in your procedure.
To test- Put following lines at the begining of "statrpt" procedure.
-SET &ECHO=ALL;
-? &
-EXIT
Then copy and paste the above url in browser address bar. Post the output.
7.6.9/7.7 Windows/OS 390 HTML
Posts: 11 | Location: Pune | Registered: March 08, 2011
I think there is a miscommunication here so I will re-state what is going on.
When, as suggested, I do the query of the local amper variables available to my procedure using the -? & those variables are NOT available to the procedure. The variables that I want to capture are being passed to the URL string from Lotus Notes which was used to develop the hyperlinks on the user's home screen. The Lotus Notes programmers are sending the values for &VAR1, &USERID and &MYEMAIL from Lotus Notes to any procedure executed from the hyperlink on the home screen. They are visible in the URL and all I need is an example of some JavaScript that can parse the URL string.
What I am looking for can be done with PHP with something like:
JavaScript was only mentioned as my best guess at how to do this.
Just as an FYI, I have done some searching both online and in this forum. I decided to post here since the solution has to be an IB solution for the most part.
I am not a novice developer by any means and really did not appreciate that response, but it's out there and I will choose to let it pass.This message has been edited. Last edited by: MarciaDrummond,
WebFOCUS 7.73 Windows, Unix, AS/400 (iSeries) HTML, PDF, MS Excel (including templates), HTML Active Reports
After reading all the posts in this thread, I understand that Lotus Notes is NOT creating this complete url
h ttp://mywebfocus.mycompany.com/ibi_apps/WFServlet?&IBIC_server=SRV1&IBIF_ex=proddir/statrpt
&VAR1=LOKEY-8L893U&USERID=MDRUMMOND&MYEMAIL=Marcia.Drummond@gmail.com
but for instance
h ttp://mywebfocus.mycompany.com/alias/launchpage.htm&VAR1=LOKEY-8L893U&USERID=MDRUMMOND&MYEMAIL=Marcia.Drummond@gmail.com
and you need to get capture those 3 variables in your launchpage.htm
If the above is not true, stop reading otherwise you could do something like this in your launchpage.htm : (no error-handling is programmed, but just to get an ieda how it could be done) (you can change type="text" to type="hidden" to hide these values)
<html>
<script>
function getVariables() {
var _tempArray = document.location.search.split("&");
for (var i=0; i < _tempArray.length; i++) {
if (_tempArray[i].toUpperCase().indexOf("VAR1=") > -1 ||
_tempArray[i].toUpperCase().indexOf("USERID=") > -1 ||
_tempArray[i].toUpperCase().indexOf("MYEMAIL=") > -1 ) {
var _id = _tempArray[i].toUpperCase().split("=")[0];
var _value = _tempArray[i].split("=")[1];
document.getElementById(_id).value = _value;
}
}
}
</script>
<body onload="getVariables();">
<form action=bladiebla ... target="your_iframe" >
<input type="text" id="VAR1" name="VAR1" value="FOC_NONE">
<input type="text" id="USERID" name="USERID" value="FOC_NONE">
<input type="text" id="MYEMAIL" name="MYEMAIL" value="FOC_NONE">
<br><br>
[i]Your variables here ...[/i]
<br><br>
<input type="submit">
</form>
</body>
</html>
This message has been edited. Last edited by: <FreSte>,
You are correct that Lotus Notes is not creating the entire URL. The Lotus Notes group has just exposed/made available those 3 variables and their values which get appended to the end our standard WebFOCUS call string as shown.
That being said, will the document.location.search.split("&") used to create the _tempArray variable also pick up the &IBIC_server=SRV1 and the &IBIF_ex=proddir/statrpt? If so, that is not an issue since I can add 2 more elements to the array and just not use them - I think. This method is new to me.
WebFOCUS 7.73 Windows, Unix, AS/400 (iSeries) HTML, PDF, MS Excel (including templates), HTML Active Reports
Yes, all &-variables will be picked up in the example above. If more variables are being added by the Lotus Group, that's no problem. The IF_THEN construction skips all &-variables which are not VAR1, USERID or MYEMAIL.
After giving this a second thought, there is a more elegant way to do it. If you want to capture some variables from the searchstring, just add an object (in this case INPUT TYPE="text") with the id to your FORM and use this function instead:
function getVariables() {
var _tempArray = document.location.search.split("&");
for (var i=0; i < _tempArray.length; i++) {
var _id = _tempArray[i].toUpperCase().split("=")[0];
var _value = _tempArray[i].split("=")[1];
if (document.getElementById(_id) ) {
document.getElementById(_id).value = _value;
}
}
}
What is does is it checks if the DOM has an object with the same id as the name of the variable (e.g. &VAR1). If it does, the object is (in this example) filled with the value of that variable. If it's not found, nothing happens.
In the interest of time, I wanted to keep the web page 'as is', so to use your JavaScript:
1. Copied your code into the Composer-generated "script area" surrounded by <script> tags.
2. I added 2 variables to the "variables" section of the HTML code by doing a copy/paste of one of the existing variables on the page. Did the appropriate renames for displayfield, field, desc, etc.
3. Most importantly, I called your JavaScript function as the value for the default value in each variable.
It worked like a charm and I am most thankful for your assistance.
WebFOCUS 7.73 Windows, Unix, AS/400 (iSeries) HTML, PDF, MS Excel (including templates), HTML Active Reports