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] Ampersand variables in an HTML launch page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Ampersand variables in an HTML launch page
 Login/Join
 
Platinum Member
posted
This client is using Version 7.7.03.

I am building HTML Launch pages in the MRE. The row level security is being based on the &IBIMR_user variable.

In order to provide the ability to send the report request to the Report Caster using the generic "Schedule" button, I need to find a way to send this value to the Report Caster. One possibility is to use a hidden input box, but how can I populate it with the corect value? Having the value appear in a "View Source" is not a limitation due to other aspects of the security system.

Is there perhaps a function in one of the many javascript includes that ride along with pages created in the HTML composer that would accomplish this?

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


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
Couldn't you have a hidden control in the form linked to a Parameter settings it's value to !IBI.AMP.IBIMR_user; ?

The "Schedule" button passes all Parameters defined in the form when creating the schedule in RC so in theory, your hidden parameter would be sent to Caster along with whatever value &IBIMr_user has.

Too simplistic or did I misunderstand your requirement?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
You understood perfectly, now, would you perhaps have a snippet of code that will do this?


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
Well, I don't but I tried to make up something quick. I don't have access to MRE in my local env. so the "schedule" button is not in the form ... but the concept is the same.

1. car_user.fex The actual report expecting &USERID as a parameter
-DEFAULT &USERID='guest';
TABLE FILE CAR
PRINT
     CAR.ORIGIN.COUNTRY
     CAR.COMP.CAR
ON TABLE SUBHEAD
"Hello <+0>&USERID"
WHERE CAR.ORIGIN.COUNTRY EQ '&COUNTRY.(FIND CAR.ORIGIN.COUNTRY,CAR.ORIGIN.COUNTRY IN car).COUNTRY.';
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
END


2. run_car_user.htm HTML launch page. Upon referencing car_user.fex in HTMl composer, 2 controls were created: USERID (hidden) and COUNTRY (drop-down).

In the parameter's tab, I selected the control for &USERID parameter (inputhidden1 in this case), right-click > "properties and settings" and set its "Selected Value" as !IBI.AMP.IBIMR_user; that's it. when the "Run" button (or 'Run Deferred' or 'Schedule') is hit a request is created to run car_user.fex passing &USERID and &COUNTRY to it.

<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7703, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>

<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>

<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
 
UpdateData();
 
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="2" thumbnailscale="4" elementtype="21" edaconnectionrequired="true">
<IFRAME style="Z-INDEX: 1; POSITION: absolute; WIDTH: 310px; HEIGHT: 300px; TOP: 120px; LEFT: 0px" id=report1 title=car_user.fex tabIndex=1 elementtype="2" requests_list="0" autoExecute="false" name="report1"></IFRAME>
<FORM style="Z-INDEX: 2; POSITION: absolute; WIDTH: 177px; HEIGHT: 110px; TOP: 0px; LEFT: 0px" id=form1 onsubmit="OnExecute(this);return false;" method=post requests_list="0" tempheight="110" tempwidth="177" fexlist_list="report1" form_newline_chain="1" default_slider_type="4" form_type="1" form_prompt_location="1" form_number_of_visible_rows="4" form_number_of_columns="4" vert_dist_between_controls="10" form_hor_dist_between_controls="10" form_dist_between_desc_and_input="10" name="form1">
<INPUT style="Z-INDEX: 5; POSITION: absolute; OVERFLOW-Y: visible; WIDTH: 187px; HEIGHT: 22px; OVERFLOW: visible; TOP: -10000px; LEFT: -10000px" id=inputhidden1 tabIndex=4 value=!IBI.AMP.IBIMR_user; hspace=0 type=hidden defaultlocation="-10000,-10000,-9978,-9833" boundtovariable="1" requiredfield="1" persistentuniqueid="compUid_1" name="inputhidden1"> 
<LABEL style="Z-INDEX: 6; POSITION: absolute; WIDTH: 77px; HEIGHT: 19px; TOP: 5px; CURSOR: default; LEFT: 5px" id=label1 tabIndex=5 for=combobox1 name="combobox1">COUNTRY</LABEL> 
<SELECT style="Z-INDEX: 7; POSITION: absolute; WIDTH: 140px; TOP: 34px; LEFT: 5px" id=combobox1 tabIndex=6 size=1 defaultlocation="0,0,22,120" boundtovariable="1" requiredfield="1" persistentuniqueid="compUid_2" name="combobox1"></SELECT> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/run16.gif); Z-INDEX: 3; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 5px" id=form1Submit tabIndex=2 value=" " type=submit StyleBack_UserSuppliedFullPath="1" name="submit1"> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/reset.gif); Z-INDEX: 4; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 48px" id=form1Reset tabIndex=3 value=" " type=reset StyleBack_UserSuppliedFullPath="1" name="reset1"></FORM>   
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden resourcectrlids="form1Submit;form1Reset">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=test type=hidden name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibic_server value=EDASERVE type=hidden isdataserversarea="1" name="ibic_server">
<xml id=focus_xmlelement>
<script type="text/xml" nextelementuniquenumber="3">
	
<rootxmlnode focoption="_FOC_NULL" top="100" left="10" width="150" height="130">
		
<variables>
			
<variable controltype="7" parametercreatedinreslay="0" type="default" desc="USERID" name="USERID" default="guest" textvarname="" accept="0" select="0" create="1" top="70" left="30" width="60" height="20" inbinding="1">
				
<link linktype="default" from="compUid_1" persistentuniqueid="compUid_1">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="USERID" datafield="USERID" datasource="car.mas" datatype="0" selectedvalue="guest" operation="" slider_range_from="" slider_range_to="" previewvalue="guest" sourcetype="typeMaster" linktype="none">
							
<static_values>
								
<static value="guest" display="guest" selected="1" noinput="0"></static></static_values></data_info></condition></link>
				
<requestid id="0"></requestid></variable>
			
<variable controltype="8" parametercreatedinreslay="0" type="unresolved" desc="COUNTRY" name="COUNTRY" default="" textvarname="" accept="0" select="0" create="1" top="70" left="140" width="60" height="20" inbinding="1">
				
<link linktype="default" from="compUid_2">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="CAR.ORIGIN.COUNTRY" ibiformat="A10" datafield="CAR.ORIGIN.COUNTRY" datasource="car.mas" datatype="1" selectedvalue="" operation="" slider_range_from="" slider_range_to="" previewvalue="" sourcetype="typeMaster"></data_info></condition></link>
				
<requestid id="0"></requestid></variable></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_1" elementtype="26" name="inputhidden1" id="inputhidden1" multiple="0" inbinding="1" top="20" left="30" width="60" height="20" onetimepopulated="1">
				
<link linktype="default" persistentuniqueid="compUid_2">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" datatype="0" datasource="car.mas" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" accept="0" operation="NONE" selectedvalue="!IBI.AMP.IBIMR_user;">
							
<static_values>
<static value="!IBI.AMP.IBIMR_user;" display="!IBI.AMP.IBIMR_user;" selected="1" noinput="0"></static></static_values></data_info></condition></link></input_control>
			
<input_control bindcontrolid="compUid_2" elementtype="8" name="combobox1" id="combobox1" multiple="0" inbinding="1" top="20" left="140" width="60" height="20" onetimepopulated="0">
				
<link linktype="default">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" datatype="1" datasource="car.mas" datafield="CAR.ORIGIN.COUNTRY" displayfield="CAR.ORIGIN.COUNTRY" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" ibiformat="A10" dfformat="A10" accept="0" selectedvalue="" operation="NONE">
							
<![CDATA[TABLE FILE car
SUM FST.CAR.ORIGIN.COUNTRY
 BY CAR.ORIGIN.COUNTRY
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END
]]></data_info></condition></link></input_control></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests nextrequestsid="0">
			
<request requestid="0" targettype="iframe" targetname="report1" sourcetype="typeFex" ibif_ex="car_user.fex" ibiapp_app="test" activereport="0" compoundreport="0" reportcolumns="" reportrealcolumns=""></request></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>


I assume that &IBIMR_user is set to (pass) from the WebFOCUS Client in your environment but to be safe, here's a stub procedure to -DEFAULT that variable to something before loading the HTML page.

3. run_car_user.fex
-DEFAULT &IBIMR_user='guess_who';
-HTMLFORM run_car_user.htm


You would start the process from 3) which will load 2) and finally executes 1) ... sorry, I put the code backwards but that's the order in which I created them so ... Music



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Thank you very much.


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're welcome.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Master
posted Hide Post
remember that ReportCaster doesn't understand &IBIMR_User (I think it is DSTEDAUSER in ReportCasterville). In any event, schedule a job with a task containing ?& and you'll see what's available.

Simply passing values will work as you've both noted.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Virtuoso
posted Hide Post
Yep. That's why we created &USERID to be the one passed to Caster and the final .fex.

I did not know about DSTEDAUSER ... well, to be honest I've never made API calls to the distribution server via DST Red Face

Now I'll have to read! Music



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report 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] Ampersand variables in an HTML launch page

Copyright © 1996-2020 Information Builders