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     [CLOSED] Manual chaining using procedures - params not passing through

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Manual chaining using procedures - params not passing through
 Login/Join
 
Member
posted
Hi,

For chaining I normally use the standard method - populating list boxes /combo boxes using data sources; then I get the GUI to chain them together.

However, I have a situation where I want one master combo box to influence two separate chains. ie: a country selector to influence the geography hierarchy (state + territory) separately to the products (Brand) available in that country.

I've successfully done this within DEV Studio by leaving the country+state+territory boxes as simple data source based chaining, then the other hierarchy uses a procedure to populate the brand list. I've explicitly coded the onchange event handlers of the country lists to use the method I've seen posted previously:

 
objctrl = document.getElementById("listbox10");
populateDynamicCtrl(objctrl);


This works beatifully for me in DEV Studio, but when I deploy it to our server, it won't work. I've done some debugging using a web debugging proxy tool (Charles) which actually shows that when the procedures are called to populate the Brand list, no parameter is passed - ie: the Country parameter do not get passed through (This is included in the FEX as below):

-DEFAULT &COUNTRY_NAME=FOC_NONE;
TABLE FILE DIM_PRODUCT
 PRINT DST.BRAND_NAME
 BY BRAND_NAME
 WHERE (COUNTRY_NAME EQ &COUNTRY_NAME);
 ON TABLE SET HOLDLIST PRINTONLY
 ON TABLE PCHOLD FORMAT XML
END


I've done the same debugging locally and it does do it properly.

Any ideas? Could it be a server setting that is different to my local? Could it be a WF version issue?

Local environment: WF 7.6.6
Server: WF 7.6.4

We are developing & deploying into Managed Reporting.

Any help greatly appreciated!

Thanks,
Steve

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


Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.01 OS: Linux Outputs: HTML, PDF, Excel, PPT
 
Posts: 7 | Location: Sydney, Australia | Registered: November 27, 2007Report This Post
Expert
posted Hide Post
Steve,

In this instance (and most others - I prefer to control the flow) I would be inclined to use fexes to populate all of the combos, using -

WHERE COUNTRY EQ '&Country' in fexes for combos 2, 3 and 4 (State, Territory and Brand)
WHERE STATE EQ '&State' in fexes for combo 3 (Territory)

That way you get exactly what you want using standard WF and without having to get into the JavaScript.

For debugging, I have another copy of ibigbl.js called ibigbl_debug.js which is a direct copy of the original with a change to the JS file reference for ibirls.js (ibirls_debug.js would you believe? Wink). In the file ibirls_debug.js I insert alerts where and when I need them. Any HTML page I create can then be debugged just by changing the ibigbl.js reference.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Hi Tony,

Thanks for the quick reply!

I've tried your suggestion of making all of these parameters (actually list boxes) get populated from a FEX. I've got the relevant FEXs with appropariate WHERE clauses similar to the ones you had (although without the quotes around the amper variables because the list boxes allow multiple selection).

I now don't have any onchange events and nothing is chained via the GUI. Now, all of the list boxes work independently. Have I missed something out?


Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.01 OS: Linux Outputs: HTML, PDF, Excel, PPT
 
Posts: 7 | Location: Sydney, Australia | Registered: November 27, 2007Report This Post
Expert
posted Hide Post
Steve,

Yes, you still have to chain all four combos via the GUI or manually code the array etc. Better to do it via the GUI unless you know what components you need to code.

One of the processes that occurs in ibirls.js is to identify each combo and add an onchange event which calls a function within ibirls.js controlling the population of the combos. By adding the chained array code, this function knows that the combo is chained and will furnish the required variable(s) from predecessor combo(s).

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Hi Tony,

Thanks. I can chain all 4 together however I actually want two separate chains.

Chain1: Combo 1, 2 & 3 (Country, State, Territory)
Chain2: Combo 1 & 4 (Country, Brand)

I can't actually get the GUI to do this, which is why I was trying the manual method and the onchange event handler.

Is this double chain scenario possible using the GUI, or should I perservere with the event handler option instead?

Thanks,
SJ


Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.01 OS: Linux Outputs: HTML, PDF, Excel, PPT
 
Posts: 7 | Location: Sydney, Australia | Registered: November 27, 2007Report This Post
Expert
posted Hide Post
You're coming to Summit, SJ?
T and I are giving a demo of just this very issue, on Tuesday afternoon at the Focal Point session, and we'll be giving you the code to actually run. its not as gui-simple as it would appear, but its not hard either.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
quote:
Is this double chain scenario possible using the GUI
Simple answer is no, but a quick and dirty way of doing this is to have a second, hidden, combo for Country and chain that to Brand. Add an onchange event to the second hidden combo to set the selectedIndex value to that from the visible one.

I'm sure that I posted something very similar (if not the same) a while ago. See if you can find that.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Susannah - unfortunately I won't be at Summit - its a bit of a hike from Australia. Maybe I'll try and plan it into the budget for next year.

Tony - I tried the scenario you described also (ie: having a hidden combo for country to mirror the main one then chaining off this), however when I set the value in the second one I can't force the chain to fire.

The frustrating thing is that I have everything functioning perfectly in my local WF 7.6.6 installation, but when I deploy to 7.6.4 it doesn't work.

Just for clarity, this is what I have done locally that actually works:

* Country, State, Territory lists populated from data sources, then chained via the GUI.
* Brand list populated using a FEX, with &COUNTRY_NAME in the WHERE clause
* Code added to the onchange event handler of the Country list to call "populateDynamicCtrl" on the brand list
* When debugging on local, I can actually see that the country name variable is passed into the FEX; whereas on the test/prod servers (7.6.6) the variable does not go into the FEX.

(BTW, before posting I did a bunch of research on the forum and I'm sure I got the above idea from one of your posts Tony - thanks)

I've decided to deploy for the time being without the chain from country to brand, but will perservere and look into upgrading the prod box to 7.6.6 at some stage.

SJ


Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.01 OS: Linux Outputs: HTML, PDF, Excel, PPT
 
Posts: 7 | Location: Sydney, Australia | Registered: November 27, 2007Report This Post
Expert
posted Hide Post
Steve,

Here's some demo code that I wrote ages ago for a female member of the forum (whose initals are SJ funnily enough!). It was written in 7.6.4 with a lot of (but not all) extraneous code stripped out.

Hopefully it should show you what I mean - it does work in later versions.

<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var rltVersion = "764";
var cgipath = "cgipath";
var ibirls = "ibirls2";

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_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
function setcomboE() {
document.getElementById("comboboxE").selectedIndex = document.getElementById("comboboxA").selectedIndex;
populateDynamicCtrl(document.getElementById("comboboxC"));
populateDynamicCtrl(document.getElementById("comboboxD"));
}
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<FORM id=form2 style="Z-INDEX: 2; LEFT: 10px; WIDTH: 760px; POSITION: absolute; TOP: 10px; HEIGHT: 300px" 
tabIndex=2 name=form2 onsubmit="OnExecute(this);return false;" method=post default_slider_type="4" 
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">
<INPUT id=form2Submit style="Z-INDEX: 3; LEFT: 0px; BACKGROUND-IMAGE: url
(/ibi_html/javaassist/ibi/html/describe/run16.gif); WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; POSITION: 
absolute; TOP: 273px; HEIGHT: 22px; BACKGROUND-COLOR: lavender" tabIndex=3 type=submit value=" " name=ITEM1>
<INPUT id=form2Reset style="Z-INDEX: 4; LEFT: 43px; BACKGROUND-IMAGE: url
(/ibi_html/javaassist/ibi/html/describe/reset.gif); WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; POSITION: 
absolute; TOP: 273px; HEIGHT: 22px; BACKGROUND-COLOR: lavender" tabIndex=4 type=reset value=" " name=reset1>
<FIELDSET id=form2_formbodyid style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; Z-INDEX: 5; LEFT: 5px; PADDING-BOTTOM: 
0px; OVERFLOW: auto; WIDTH: 750px; BORDER-TOP-STYLE: none; PADDING-TOP: 0px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: 
none; POSITION: absolute; TOP: 5px; HEIGHT: 260px; BORDER-BOTTOM-STYLE: none" tabIndex=5 formbody="1">
<SELECT id=comboboxA onchange="setcomboE();" style="Z-INDEX: 6; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 15px" 
tabIndex=6 name=Year dynalldisplayvalue="All Years" addalloption="1" inchainindex="1" chainnumber="0" cacheruntimedata="0" 
ibiapp_app="ibinccen anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="sj_combo1.fex" 
newchainnumber="0"></SELECT>
<SELECT id=comboboxB style="Z-INDEX: 7; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 55px" tabIndex=7 name=Month 
dynalldisplayvalue="All Months" addalloption="1" inchainindex="2" chainnumber="0" cacheruntimedata="0" 
ibiapp_app="ibinccen anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="sj_combo2.fex" 
newchainnumber="0" attvariables="Year;"></SELECT>
<SELECT id=comboboxE disabled style="Z-INDEX: 8; LEFT: 375px; WIDTH: 180px; POSITION: absolute; TOP: 15px" tabIndex=8 
name=Year1 dynalldisplayvalue="All Years" addalloption="1" inchainindex="1" chainnumber="1" cacheruntimedata="0" 
ibiapp_app="ibinccen anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="sj_combo1.fex" 
newchainnumber="0"></SELECT>
<SELECT id=comboboxC style="Z-INDEX: 9; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 95px" tabIndex=9 name=Quarter 
dynalldisplayvalue="All Quarters" addalloption="1" inchainindex="2" chainnumber="1" cacheruntimedata="0" 
ibiapp_app="ibinccen anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="sj_combo3.fex" 
newchainnumber="0" attvariables="Year;"></SELECT>
<SELECT id=comboboxD style="Z-INDEX: 10; LEFT: 175px; WIDTH: 180px; POSITION: absolute; TOP: 135px" tabIndex=10 name=Date 
dynalldisplayvalue="All Dates" addalloption="1" inchainindex="3" chainnumber="1" cacheruntimedata="0" ibiapp_app="ibinccen 
anthonyalsford" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="sj_combo4.fex" newchainnumber="0" 
attvariables="Year;Quarter;"></SELECT>
<SPAN id=text1 style="Z-INDEX: 11; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 15px; HEIGHT: 19px" 
tabIndex=11>Year</SPAN>
<SPAN id=text2 style="Z-INDEX: 12; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 55px; HEIGHT: 19px" 
tabIndex=12>Month</SPAN>
<SPAN id=text3 style="Z-INDEX: 13; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 95px; HEIGHT: 19px" 
tabIndex=13>Quarter</SPAN>
<SPAN id=text4 style="Z-INDEX: 14; LEFT: 25px; WIDTH: 130px; POSITION: absolute; TOP: 135px; HEIGHT: 19px" 
tabIndex=14>Date</SPAN>
</FIELDSET>
</FORM>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden 
inputcontrolids="combobox1;combobox2;combobox3">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value="ibinccen anthonyalsford" 
name=ibiapp_app>
<SCRIPT id=IBI_ChainScript type=text/javascript>
<!--
window.chain0=new Array(1);
window.chain0[0]=new String("comboboxA;comboboxB");
window.chain0[1]=0
window.chain1=new Array(1);
window.chain1[0]=new String("comboboxE;comboboxC;comboboxD");
window.chain1[1]=0
//--></SCRIPT>
</BODY>
<SCRIPT id=IBI_loader type=text/javascript>
//doBeforeLoad();
</SCRIPT>
</HTML>

The fexes are -

-* SJ_Combo1.fex
TABLE FILE CENTORD
SUM FST.YEAR
 BY YEAR
ON TABLE PCHOLD FORMAT XML
END
-RUN
-* SJ_Combo2.fex
-DEFAULT &Year = 'FOC_NONE'
TABLE FILE CENTORD
SUM FST.MONTH
 BY MONTH
WHERE YEAR EQ &Year
ON TABLE PCHOLD FORMAT XML
END
-RUN
-* SJ_Combo3.fex
-DEFAULT &Year1 = 'FOC_NONE'
TABLE FILE CENTORD
SUM FST.QUARTER
 BY QUARTER
WHERE YEAR EQ &Year1
ON TABLE PCHOLD FORMAT XML
END
-RUN
-* SJ_Combo4.fex
-DEFAULT &Year1    = 'FOC_NONE'
-DEFAULT &Quarter = 'FOC_NONE'
TABLE FILE CENTORD
SUM FST.ORDER_DATE
 BY ORDER_DATE
WHERE YEAR    EQ &Year1
WHERE QUARTER EQ &Quarter
ON TABLE PCHOLD FORMAT XML
END
-RUN

Hope it helps

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Thanks Tony, I'll try this out when I'm back in the office later in the week.

Cheers, SJ


Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.01 OS: Linux Outputs: HTML, PDF, Excel, PPT
 
Posts: 7 | Location: Sydney, Australia | Registered: November 27, 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     [CLOSED] Manual chaining using procedures - params not passing through

Copyright © 1996-2020 Information Builders