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] Understanding amper variables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Understanding amper variables
 Login/Join
 
Member
posted
I have an html page with some filter variables at the top and then a tab control with 2 tabs with iframes in each tab. When the user clicks the 'run' button, I call the IbComposer_execute('iframe1'); IbComposer_execute('iframe2'); method to populate the iframes via a .fex file.

The iframe1 .fex file does some database validation based on the entered filters. If the validation fails, the .fex file sets an amper variable message (&Message) and then triggers a button clicked event on the html page to make the tabs invisible so the user can change their filter criteria. This button also should display the message to the user based on the &Message that is set in the .fex file.

Everything is working as desired, but the &Message is not being populated in the html code (it is being set in the .fex file). There is an edit control on the html page for the &Message variable... so what am I doing wrong?

Here is some of the code..

-*----------.fex file---------------------
-*This method validates filter and set &Message if failure
-INCLUDE app/common_validate_filter.fex
-TYPE Message &Message
-RUN
-IF &Message EQ ' ' THEN GOTO ALL_GOOD;

-HTMLFORM BEGIN
<HTML>
<HEAD></HEAD>
<BODY ONLOAD=window.parent.document.getElementById["button2").click[);></BODY>
</HTML>

-HTMLFORM END

-GOTO EOF

-ALL_GOOD;

-*--------.html file ----------------
function button2_onclick(ctrl) {

//Make objects visible/invisible

showElement(false);

buttonChangeEnable('button1', 'Graph');

alert('!IBI.AMP.Message;');



<input_control bindcontrolid="compUid_201" elementtype="7" name="edit4" id="edit4" multiple="0" inbinding="1" top="110" left="690" width="60" height="20" onetimepopulated="1">
				
<link linktype="default" persistentuniqueid="compUid_109">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" accept="0" sourcetype="typeMaster" datasource="" displayfield="" datafield="" datatype="0" selectedvalue="!IBI.AMP.Message;" addalloption="0" modifiedrequest="1" operation="NONE">
							
< ![CDATA[]]>
							
<static_values>
<static value="!IBI.AMP.Message;" display="!IBI.AMP.Message;" selected="1" noinput="0"></static></static_values></data_info></condition></link></input_control>


<INPUT style="Z-INDEX: 67; POSITION: absolute; WIDTH: 120px; HEIGHT: 19px; TOP: 90px; LEFT: 690px" id=edit4 tabIndex=115 value=!IBI.AMP.Message; defaultselection="1" persistentuniqueid="compUid_201" name="edit4">

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 7.7.2
Windows, HTML, PDF, and Excel
 
Posts: 18 | Registered: February 23, 2011Report This Post
Virtuoso
posted Hide Post
Try enclosing !IBI.AMP.Message; in quotes, in the INPUT line's value= clause.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
Thanks, but adding quotes didn't work..


Webfocus 7.7.2
Windows, HTML, PDF, and Excel
 
Posts: 18 | Registered: February 23, 2011Report This Post
Expert
posted Hide Post
As far as I can tell, that !IBI.AMP.Message; is static and is added to the html page once, upon initial load.

Your fex common_validate_filter.fex should not create an amper variable but instead generate a one line report that contains the text of the message. The target of the fex should be an iframe somewhere on the html page.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Thanks for the info... I was headed in the direction you suggested (generate a one line report) but here is what I did instead.

I created a hidden text field and then added this to the html code to trigger the clicked button.

-HTMLFORM BEGIN
<HTML>
<HEAD></HEAD>
<script>
  parent.document.getElementById("edit4").value = "&Message";
</script>
<BODY ONLOAD=window.parent.document.getElementById("button2").click();></BODY>
</HTML>
-HTMLFORM END


I then modified the button2 clicked code to display the value from the hidden text field.

Works great! Thanks for everyone's help... another great learning opportunity!


Webfocus 7.7.2
Windows, HTML, PDF, and Excel
 
Posts: 18 | Registered: February 23, 2011Report 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] Understanding amper variables

Copyright © 1996-2020 Information Builders