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] Simultaneous chaining controls

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Simultaneous chaining controls
 Login/Join
 
Member
posted
Is there a way to chain a list box control to two list box controls simultaneously through GUI?
That is A is chained to B and C.
NOT A chained to B chained to C.

This message has been edited. Last edited by: Kerry,
 
Posts: 5 | Location: Minneapolis | Registered: July 21, 2004Report This Post
Master
posted Hide Post
I don't believe you can but if you do not mind c refreshing everytime a or b is changed you could do this.

Have the c populate from a procedure and only use the value of a in a where statement do not put the value of b in a where statement.

Like I said the only drawback is every time a or b changes c will get refreshed.

Hope this helps




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Hi Ilias,
Developer Studio DOES have this option to chain listboxes and such. The data can be taken from the data source or from a procedure. This should get you started.
Regards,
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
Master
posted Hide Post
RichH,

He is asking of A can be chained to B and if A can be chained to C, NOT A to B and B to C.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
Ilius,

Not through point and click only, but adding an onchange event to your controls. However, you will have to check the running of your scripts carefully as WF tends to "remove" onchange events from combo box controls when you start playing with chaining (see previous posts in this forum from some time ago).

There is a function in IBIRLS.js that is called to refresh the contents of a particular control, and it is called "populateDynamicCtrl()". It expects an object as input and will update that object according to the values of the controls within the form. So you could add an onchange event to "A" to call the function for both "B" and "C".

The default IDs given to combo controls are combobox with a number suffix. For arguments sake the following example expects them to be combobox1, combobox2 and combobox3. Add an onchange event to combobox1 as follows (the basic function syntax will be added for you when you click the onchange event from the event dialog in the GUI) -
function combobox1_onchange(ctrl) {
  objctrl = document.getElementById("combobox2");
  populateDynamicCtrl(objctrl);
  objctrl = document.getElementById("combobox3");
  populateDynamicCtrl(objctrl);
}

This will effectively "chain" combobox2 and combobox3 to combobox1 as you wanted. But as I said earlier, be wary of how WF dynamically changes combobox events - particularly the onchange event!

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
Platinum Member
posted Hide Post
For what it's worth, better control of chaining is one of the big reasons we don't stay in the GUI anymore on HTML layouts. I know you're trying to stay in that GUI as much as possible, and that's fine -- just don't get too "married" to it that you cut yourself short on better functionality.

my 2 cents... It's good, but it likely won't do everything you need it to.

Good luck!



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
 
Posts: 230 | Location: Wichita, KS | Registered: May 27, 2005Report This Post
Member
posted Hide Post
Tony A. – Thank you for your help. Is there a way to get information on IBIRLS.js? Any document will be good.

Trav - You are right. I personally do not like the GUI as it is limited in its capacity. However, I am seeing that more and more clients these days want to use GUI.
 
Posts: 5 | Location: Minneapolis | Registered: July 21, 2004Report This Post
Expert
posted Hide Post
Ilias,

Unfortunately not, to my knowledge anyway. It's a case of read through it and discern the details for yourself, although I did put some info on the Forum a while back. Be aware though that it could / will change with new releases.

Also, check which one your HTML is using - ibirls.js or ibirls2.js - before looking through the code, as they are different and ibirls.js is provided for previous releases of WF.

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
Tony A,
Can you share an example for the above question? Thanks.

This message has been edited. Last edited by: Ilias Basha,
 
Posts: 5 | Location: Minneapolis | Registered: July 21, 2004Report This Post
Gold member
posted Hide Post
Tony, your post on
quote:
Posted May 13, 2007 11:33 AM

in this topic caught my attention and I'm trying to make this work. I have listbox1, listbox2, listbox3, and listbox4.
listbox1 is chained to listbox2. Next I want to simultaneous chain listbox2 to listbox3 and listbox4 so I used your code sample (with slight modifications for my object names):

quote:
function combobox1_onchange(ctrl) {
objctrl = document.getElementById("LISTBOX3");
populateDynamicCtrl(objctrl);
objctrl = document.getElementById("LISTBOX4");
populateDynamicCtrl(objctrl);
}


to populate listbox3 and listbox4 whenever the value of listbox2 is changed. I know the code is firing and listbox3 and listbox4 are being repopulated. The issue is that they are being repopulated with the original data elements, not with those that are associated with the selected value in listbox2.

I was expecting only the MODELS for the CAR selected in listbox2 to display in listbox3.

this is the code populating listbox3:

-DEFAULT &LISTBOX2= 'FOC_NONE' ;
TABLE FILE CAR
SUM FST.MODEL
WHERE CAR = '&LISTBOX2' ;
ON TABLE PCHOLD AS DDLIST FORMAT XML
END


but I get all the cars. There's obviously a criticle piece that I'm missing.

All list boxes are populated with .fex procedures.

listbox1 and listbox2 with
TABLE FILE CAR
SUM FST.COUNTRY FST.CAR
BY COUNTRY
BY CAR
ON TABLE PCHOLD AS DDCAR FORMAT XLM
END

listbox3 is above. esentially listbox4 is the same. I know if I can get listbox3 to 'filter' correctly listbox4 will follow with the same code change.

What is that obvious piece of code that I can't see through the forest?

Edited the above after Tony's question below. The NAME attributes are UPPER case.

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


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Expert
posted Hide Post
Laure,

Is LISTBOX2 or listbox2 the Name attribute within your HTML (not the ID)?

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
Gold member
posted Hide Post
LISTBOX2

I also modified the above text. There were a couple of case changes to match what I'm really attempting to make work.
Thanks.


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Expert
posted Hide Post
Laure,

Perhaps if I explain the process of how chaining should function? Forgive me if you already understand certain parts. And remember this is brief info so as to keep it simple.

When loading the HTML page various javascript files are loaded. Each of these files has function(s) that are used to provide certain features, one such feature being chaining.

When you build your HTML page using the GUI, you associate various controls by selecting them and then clicking the chain icon. This does a couple of things specific to chaining. The first is to create a small piece of javascript towards the bottom of your HTML page that declares a new array and lists the control Ids in the order selected(?). The other part is that the attributes held within each individual combobox control for chainnumber, inchainindex and newchainnumber. Only the first two are important within a single chain the third is used (I believe) in the GUI.

The attribute chainnumber is set from -1, meaning unchained, to the number of the chain in which it resides. The attribute inchainindex refers to the position within the array that the combobox sits.

When the HTML page is loaded all the various onload functions are being run, and at some point the first combobox in a chain will be encountered. This will be processed virtually as is, because it is the first in the chain.

When the second and subsequent comboboxes are encountered, something slightly different happens, and that is the determination of the variable name and value from preceding chained items. These are then used in the AJAX style call to the Master or fex in question.

When the second combo is encountered a request is built to restrict the rows returned in the xml.

If the "sourcetype" attribute of the combo being populated in "typeMas" then an adhoc fex is built along the lines of -
TABLE FILE [datasource attribute value]
SUM FST.[datavlue attribute value]
 BY {displayvalue attribute value]
ON TABLE PCHOLD FORMAT XML
END
However, because there is a preceding combo box, an additional line is inserted before the ON TABLE PCHOLD line, and that is built from the values of the preceding combo for the "name" and "value" attributes. Because it is a combo the value is determined by the selectedIndex value. So you get the additional line of WHERE &[previous combo name attribute value] EQ [previous combo value attribute].

So, say that your first combo has the "name" attribute of Country and that your user has selected ENGLAND in that combo, the extra line of code would be WHERE &Country EQ 'ENGLAND'.

Hence the xml produced by the request is restricted by the previous combo value and your chaining works!!

To use a fex to provide the values for chained combos, just replicate the code that the javascript creates!

Hope this helps you understand the process and enables you to get past the current blockage.

T

(btw if you're going to summit, mines a pint of Guiness in the Irish bar Wink)



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
  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] Simultaneous chaining controls

Copyright © 1996-2020 Information Builders