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.
I've created a launch page with a couple of chained controls. Based on the selection in the first control the number of values returned to the second control can be quite large (~4,000).
While the values are being fetched (about 3-4 seconds after a selection is made in the first control) IE displays a message box as follows: Title - Microsoft Internet Explorer Subject - Stop running this script? Body - A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Actions - Yes or No
Can this be managed by a browser setting?
I've even created a 'lookup' table (MSSQL) that contains the distinct values to be returned so the procedure doesn't need to sift through over 1M records just to get 4,000 distinct values. In another post I found a tip on using PRINT DST.FIELDNAME in stead of SUM FST.FIELDNAME BY FIELDNAME. That does improve return time but not enough to prevent IE from displaying the message box.
Any ideas on how I can make the values return faster? I wish the listbox control had an 'on demand paging' setting. Maybe I'll submit that as a NFR.
Thanks all,
DanThis message has been edited. Last edited by: Dan Pinault,
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007
Dan, I don't think the IE pop-up message is displayed because it is taking long to retrieve the 4000 rows, the message is displayed because IE evaluates there is a javascript function that's taking too long... Is it practical for the user to search through 4000 select options?
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
Normally, no, it is not practical for the user to scroll through 4000 items in a list. However, I am building an ad-hoc reporting application and I want them to build their own filters. The way I do this is to present them a list of fieldnames in a combobox and then display the field values in a listbox. Most of the fields will not have so many values but there are some that are close to 4000.
My original idea for this was to create a combobox with the first initial of the items in the list then populate the select_from side of a double-listbox with just those values. Then the user can move those items they want to the select_to side of the double-listbox. After that they can select another initial and repeat the process until they have selected all the items they want.
This actually works well except that in 7.6.9 HF2 there is a bug in the double-list control so that when you select a new initial from the combobox the entire double-listbox is reset so all the previous selections in the select_to side are removed.
This gives me an idea though. I'm wondering how difficult it might be to create next and previous buttons so the listbox only displays n items at a time and the user can step forward or backward through the list.
Hmmm...
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007
OK - I came up with this method for retrieving the listbox values in groups of 10. Most likely I'll change that to 100 but for now 10 works for testing.
-DEFAULT &BLOCKNUM = 1;
-SET &HIROW = &BLOCKNUM * 10;
-SET &LOWROW = &HIROW - 9;
TABLE FILE PERSINFO
SUM
FST.ID
COMPUTE ROW_CNT/I11 = ROW_CNT + 1;
BY ID
WHERE TOTAL ROW_CNT FROM &LOWROW TO &HIROW;
ON TABLE PCHOLD FORMAT HTML
END
The way this works is by increasing or decreasing the &BLOCKNUM value.
In this specific example the max value for ROW_CNT is 41. That means the values for &BLOCKNUM that will give results are 1 - 5.
I'm not sure how to limit the possible values for &BLOCKNUM though. If you enter 6, or 7, or 99, etc. the procedure will just return an empty result set.
I suppose I could use some javascript in the html page to look at the number of items in the listbox. If it is less than 10 I could disable the 'next' button.
I'm certainly open if anyone has a better suggestion!
Thanks,
Dan
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007
We do a lot of html pages with multiple combo box for multiple choices. We use javascript functions to populate the combos. Here is an example (sorry, some of the descriptions are in french) Hope it will help you. Catherine
// Intial function to load a combo box
// objSelect= nom de la liste de niveau inférieur (= name)
// objFill = nom de la listbox à charger (= name)
// FILENAME = nom du master source
// FIELDNAME = nom du champ sélectionné dans la lise box (= code)
// FIELDVALUE = nom du champ qui apparaît dans la listbox (= libellé)
// FIELDVALUE2 = nom du champ sur lequel on teste pour afficher telle ou telle valeur dans la listbox
// FILTERFIELD = si clause where, champ sur lequel porte la clause where
// FILTERVALUE = contenu de la clause where (= champ Clause_where)
// FILTERFIELD2 = au cas où, un deuxième champ pour la clause where. si besoin de plus, on en ajoute
// FILTERVALUE2 = contenu de la clause where pour le 2ème champ
// ==> ça se construit comme dans une instruction SQL, il faut gérer les AND, OR et les parenthèses
function fillSelect(objSelect,objFill,FILENAME,FIELDNAME,FIELDVALUE,FIELDVALUE2,FILTERFIELD,FILTERVALUE,FILTERFIELD2,FILTERVALUE2) {
var urlString =getURL(FILENAME,FIELDNAME,FIELDVALUE,FIELDVALUE2,FILTERFIELD,FILTERVALUE,FILTERFIELD2,FILTERVALUE2);
xml_to_select(urlString,objSelect,objFill);
return;
}
function xml_to_select(urlString,objSelect) {
// Use the XMLDOM Parser to submit the FOCUS request and parse out the values
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.load(urlString);
var ElemList = xmlDoc.getElementsByTagName("td");
if (ElemList.length > 0) {
remove_choices(objSelect);
//just loop through all the returned values
for (i=0;i < ElemList.length;i+=2){
var oOption = document.createElement("OPTION");
objSelect.options.add(oOption);
oOption.value = ElemList.item(i).text;
oOption.text = ElemList.item(i+1).text;
}
}
xmlDoc = null;
return;
}
// remove_choices clears all options from a given objSelect Select control
function remove_choices(objSelect){
for (i=objSelect.options.length;i >= 0;i--){
objSelect.options.remove(i);
}
return;
}
//Build the url that will be submitted to WebFOCUS
function getURL(FILENAME,FIELDNAME,FIELDVALUE,FILTERFIELD,FILTERVALUE,FILTERFIELD2,FILTERVALUE2) {
/* FOCUS request will be submitted as an adhoc request. Syntax of request is:
TABLE FILE FILENAME
PRINT FIELDNAME FIELDNAME
WHERE FILTERFIELD EQ FILTERVALUE;
ON TABLE PCHOLD FORMAT XML
END
-* FIELDNAME is referenced twice: for Text/Display and Value of option
*/
var urlString = "https://www.cotiletdons.com:9080/ibi_apps/WFServlet?";
urlString += "IBIC_user=" + IBIC_user.value + "&IBIF_adhocfex=";
var CRLF = "\n\r" ;
focusString = "TABLE FILE " + FILENAME + CRLF;
focusString += "PRINT " + FIELDNAME + " " + FIELDVALUE + CRLF;
if (FILTERFIELD |= " ")
{focusString += "WHERE " + FILTERFIELD + " EQ '" + FILTERVALUE + "';" + CRLF}
if (FILTERFIELD2 |= " ")
{focusString += "WHERE " + FILTERFIELD2 + " EQ " + FILTERVALUE2 + ";" + CRLF}
focusString += "ON TABLE SET HOLDLIST PRINTONLY" + CRLF;
focusString += "ON TABLE PCHOLD FORMAT XML" + CRLF;
focusString += "END";
// escape function properly formats the string in unicode format for transferring to webserver
urlString += escape(focusString);
return(urlString);
}
return;
}
7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....) OS400 V5R3, V5R4 Windows 2000/2003/2007/2010
Posts: 68 | Location: France | Registered: February 27, 2008
While the values are being fetched (about 3-4 seconds after a selection is made in the first control) IE displays a message box as follows: Title - Microsoft Internet Explorer Subject - Stop running this script? Body - A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Actions - Yes or No
We had the same problem using Dashboard with a big number of reports. It turned out to be setting in the registry that caused this message.
Austria.... does that registry statement have to be changed on the user's computer? or is it something you changed on your win2k3 server?? I'm sure that's a dumb question...but i'm trying to make sense out of this idea in a UNIX environment. We have the same error when we try to do our combo boxes with a single COMPOUND fex, the resultant array being just too big. So we use separate fexes, the COMPLEX way... but we don't get 3-4 seconds..we get 10+ ... too long.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Check it out. I came up with a method to handle long lists of values with NO JAVASCRIPT REQUIRED! This is using the 7.6.9 chaining feature where you have more control of the code that populates the controls. I would imagine that you could hand-code the same type of thing in an earlier version. Not sure about that though.
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<META id=mycharsetmeta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META id=Generation content="Gen 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 src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>
<SCRIPT id=IBI_nlsVars src="/ibi_html/javaassist/nlsvars.js" type=text/javascript></SCRIPT>
<SCRIPT id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>
<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
</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 eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="73" edaconnectionrequired="true">
<SELECT id=combobox1 style="FONT-SIZE: 8pt; Z-INDEX: 4; LEFT: 10px; WIDTH: 250px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 10px" tabIndex=1 name=combobox1 persistentuniqueid="compUid_1"></SELECT>
<SELECT id=listbox1 style="FONT-SIZE: 8pt; Z-INDEX: 4; LEFT: 10px; WIDTH: 250px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 40px" tabIndex=4 size=10 name=listbox1 persistentuniqueid="compUid_2"></SELECT>
<SPAN id=slider1 title="" style="LEFT: 10px; WIDTH: 41px; POSITION: absolute; TOP: 10px; HEIGHT: 5px" tabIndex=-1 persistentuniqueid="compUid_42" slider_always_show_input="false" slider_steps_perarrowclick="1" slider_step="1" slider_range_to="100" slider_range_from="0" slider_type="2" elementtype="37">slider1
<INPUT id=slider1_uparrow style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; Z-INDEX: 6; LEFT: 141px; WIDTH: 50px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 180px; HEIGHT: 22px" tabIndex=5 type=button size=56 value=Next name=button1>
<INPUT id=slider1_downarrow style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; Z-INDEX: 7; LEFT: 51px; WIDTH: 50px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 180px; HEIGHT: 22px" tabIndex=6 type=button size=45 value=Prev name=button2 persistentuniqueid="compUid_61">
<SPAN id=slider1_slidertrack style="FONT-SIZE: 1pt; Z-INDEX: 8; LEFT: 21px; VISIBILITY: hidden; WIDTH: 428px; POSITION: absolute; TOP: 31px; HEIGHT: 8px; BACKGROUND-COLOR: lightgrey" tabIndex=-1>
<SPAN id=slider1_sliderbutton style="Z-INDEX: 9; LEFT: -4px; WIDTH: 8px; POSITION: absolute; TOP: -5px; WRITING-MODE: tb-rl; HEIGHT: 18px; BACKGROUND-COLOR: darkgray" tabIndex=7><></SPAN></SPAN></SPAN>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden>
<INPUT id=IBIMR_domain style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=powersys/powersys.htm name="IBIMR_domain">
<INPUT id=IBIMR_folder style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=#testsp12zgnb name="IBIMR_folder">
<INPUT id=ibif_ex style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=app/largelists.htm name="ibif_ex">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden name="ibiapp_app" ismre="1">
<INPUT id=ibic_server style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=EDASERVE name="ibic_server">
<xml id=focus_xmlelement>
<script>
<rootxmlnode top="20" left="1147" width="150" height="130">
<variables></variables>
<input_controls>
<input_control bindcontrolid="compUid_1" inbinding="1" top="55" left="45" width="60" height="20" elementtype="8" name="combobox1" id="combobox1" multiple="0" unresolved="0" onetimepopulated="0">
<link linktype="default">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
<data_info datatype="1" sourcetype="typeMaster" modifiedrequest="1" selectedvalue="PIN" datafield="FIELDNAME" displayfield="FIELDNAME">
<!-- This combobox presents the user with a list of available fields from the table -->
<![CDATA[SET ASNAMES = ON
CHECK FILE PERSINFO HOLD AS PIHLD
TABLE FILE PIHLD
SUM
FST.FIELDNAME
BY FIELDNAME
ON TABLE PCHOLD FORMAT XML
END
]]></data_info></condition></link></input_control>
<input_control bindcontrolid="compUid_42" inbinding="1" top="210" left="40" width="60" height="20" elementtype="37" name="slider1" id="slider1" multiple="0" onetimepopulated="0">
<link linktype="default" from="compUid_1">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="FIELDNAME" resolveparameter="FIELDNAME">
<data_info slider_range_from="0" slider_range_to="4000" slider_step="1" datatype="1" sourcetype="typeMaster" modifiedrequest="1" datafield="BLOCKNUM" displayfield="BLOCKNUM">
<!-- This is a slider control that constructs the proper data structure and sets the value of &BLOCKNUM -->
<![CDATA[SET ASNAMES = ON
-DEFAULT &FIELDNAME = 'PIN';
TABLE FILE PERSINFO
SUM FST.&FIELDNAME
RANKED AS ROWNUM BY &FIELDNAME
ON TABLE HOLD AS FOCCACHE/FIELDHOLD
END
TABLE FILE FOCCACHE/FIELDHOLD
PRINT
&FIELDNAME
ROWNUM
<!-- Change the number for IN-GROUPS-OF to set the number of items to load into the control -->
RANKED AS BLOCKNUM BY ROWNUM NOPRINT IN-GROUPS-OF 10
ON TABLE SET BYDISPLAY ON
ON TABLE HOLD AS FOCCACHE/BLOCKHOLD
END
TABLE FILE FOCCACHE/BLOCKHOLD
SUM FST.BLOCKNUM AS BLOCKNUM
BY BLOCKNUM AS BLOCKNUM
ON TABLE PCHOLD FORMAT XML
END]]></data_info></condition></link></input_control>
<input_control bindcontrolid="compUid_2" inbinding="1" top="10" left="365" width="60" height="20" elementtype="9" name="listbox1" id="listbox1" multiple="0" unresolved="0" onetimepopulated="0">
<link linktype="default" from="compUid_42">
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="BLOCKNUM" resolveparameter="BLOCKNUM">
<data_info sourcetype="typeMaster" datatype="1" modifiedrequest="1" datafield="FIELDVALS" displayfield="FIELDVALS">
<!-- This populates the listbox with the items based on the value of &BLOCKNUM which is passed from the slider control -->
<![CDATA[SET ASNAMES = ON
-DEFAULT &FIELDNAME = 'PIN';
-DEFAULT &BLOCKNUM = 1;
TABLE FILE FOCCACHE/BLOCKHOLD
SUM FST.&FIELDNAME AS FIELDVALS
BY &FIELDNAME AS FIELDVALS
WHERE BLOCKNUM = &BLOCKNUM;
ON TABLE PCHOLD FORMAT XML
END]]></data_info></condition></link></input_control>
</input_controls>
<other_bound_objects></other_bound_objects>
<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>
7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007