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     [RESOLVED] Chaining controls from different data sources?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[RESOLVED] Chaining controls from different data sources?
 Login/Join
 
Virtuoso
posted
Hey all,

So I'm trying to build out an HTML form with controls for filtering various reports that will display on multiple pages within a portal.

This form has 8 controls. 7 of the controls pull data from data source A while 1 control pulls data from data source B. I have the desire to chain all controls.

Scenario:

Form:

Controls:

1- Fiscal year; (data source A)
2- Fiscal week; (data source A)
3- Division; (data source A)
4- District; (data source A)
5- Banner; (data source A)
6- Store; (data source A)
7- Store Dept; (data source A)
8- Cashier; (data source B)

These filters are pulled from these data sources using self-contained .fexs tied to each control.

Now for the question:
Is it possible to chain controls tied to data from different sources?

The dependencies work up to the cashier filter, but then fail to populate the cashier list specific to the &FISCALYEAR, &FISCALWEEKOFYEAR, and &DSACCTNO(store) values from the controls above that the cashier filter requires.

Anyone ever try to do this before? And how did you get it to work if you did?

Thanks!

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


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
This is possible in multiple ways.

One way is if the cartesian product of all the possible combinations of the 8 filters is not too large, you can create one fex that will generate all possibilities (PCHOLD FORMAT XML), assign this fex to each control and then chained them together.

Also, with this option, you can have the "NOSELECTION" option that may be used to avoid loading of a subsequent list while no value is selected from its parent.

Another one, when to many possibilities and where issues may appears in loading the list values, is to create separate fex for each list of values per control and use jscript ou jquerry to call them only when the selection is made on the parent of a list. So, as example, you will load cashier only when &FISCALYEAR, &FISCALWEEKOFYEAR and &DSACCTNO will have been selected.

And possibility of many others options...


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Hey MartinY,

Thanks for your ideas on how this could be done. There are several examples of how to chain controls from one data source, but nothing I could find on chaining from multiple data sources.

I'm really new to WEBFOCUS (using 8) and their dev environments (Dev/AppStudio). I wish I knew how to go about implementing what you've described. I've successfully chained controls before using external .fexs for each control all pulling from one data source, but haven't done it successfully with 2+.

With your first possibility (using one .fex to pull all filter data), how would you separate the product of that only allowing proper data into each filter? Where can I go to get more info on how to additionally implement the "NOSELECTION" functionality you spoke of?

With your second possibility (separate .fexs, adding Js/jQ), I've done the .fex part, but do not know what to write Js/jQ-wise to only allow the right cashier data (from source 2) to populate once the &FISCALYEAR, &FISCALWEEKOFYEAR and &DSACCTNO (from source 1) have had selections made.

I don't expect you to give me a solution unless you are really nice and want to do that (I would be way grateful), but if you could point me (if possible) in the right direction of where I might find examples of how this has been done before by others or within official documentation I would really appreciate it.

Thanks again!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
The "No Selection" is an option that you can select from the control's "Properties and settings" of a listbox/dropdown list with a Dynamic datatype.

As for how to create one fex with all data because you have multiple sources, I suggest to extract separately from the different source and HOLD them separately, then merge/join them together into one HOLD file.
If you create the proper BY (hierarchy) fields the filtering will be made automatically by the chaining feature because you will reuse the same fex for each listbox. It's important to have your last format as XML to be used by HTML as the listbox data.

-* Fex for listbox data
-* fex name : zzzzz.fex
TABLE FILE CAR
SUM COUNTRY
    CAR
    MODEL
BY COUNTRY
BY CAR
BY MODEL
ON TABLE PCHOLD FORMAT XML
END


-* HTML Code generated with HTML Composer V8.0.0.9
-**************************************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=9>
<META name=mycharsetmeta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META name=Generation content="Created in release 8009, Generation 3">
<SCRIPT type=text/javascript>//confidential_id=IBI_OptionsScript
var szHtmlAlias="/ibi_apps/ibi_html";var szRunTimeHtmlAlias="runTimeHtmlAlias";var cgipath="cgipath";var ibirls="ibirls3";var rltdyncalendar="rltdyncalendar";var map="ibimap";var olap="olap";var olappanebase="olappanebase";var olapdrill="olapdrill";var ibiOptions = new Array(cgipath,ibirls);var nlsScript="/javaassist/nls.js";var glbScript="/javaassist/ibi/html/js/ibigbl.js";var replacePart="<replace>";
var scriptTemplate='<SCRIPT src="'+replacePart+'" type="text/javascript"><\/SCRIPT>';if(typeof(szRunTimeHtmlAlias) === 'string' && szRunTimeHtmlAlias.indexOf('/') == 0)szHtmlAlias=szRunTimeHtmlAlias;document.write(scriptTemplate.replace(replacePart, szHtmlAlias + nlsScript));document.write(scriptTemplate.replace(replacePart, szHtmlAlias + glbScript));</SCRIPT>

<SCRIPT type=text/javascript>//confidential_id=IBI_ibigblloadCss
if(typeof ibigblloadCss === 'function'){ibigblloadCss(null);addIntlTranslatedJS("composertrans.js");}else {alert("JavaScript alias '/ibi_apps/ibi_html'  is not valid");window.location("about:blank");}</SCRIPT>
<TITLE>HtmlPage</TITLE><LINK id=ITEM2 rel=stylesheet type=text/css UserSuppliedFullPath="1" rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/default_theme.css"><LINK id=IBI_THEME_CSS rel=stylesheet type=text/css UserSuppliedFullPath="1" desc="Information Builders" rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/ibi.css">
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<SCRIPT>//confidential_id=clientEventHandlersJS


//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>
</HEAD>
<BODY class=IBI_PageBg style="OVERFLOW: auto" nextelementuniquenumber="3" maptype="0" thumbnailscale="4" elementtype="21" edaconnectionrequired="true"><SELECT tabIndex=1 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" id=listbox1 style="HEIGHT: 110px; WIDTH: 270px; POSITION: absolute; LEFT: 50px; Z-INDEX: 1; TOP: 70px" size=3 defaultselection="1" persistentuniqueid="compUid_1" name="listbox1"></SELECT><SELECT tabIndex=2 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" id=listbox3 style="HEIGHT: 110px; WIDTH: 270px; POSITION: absolute; LEFT: 50px; Z-INDEX: 2; TOP: 190px" size=3 defaultselection="1" persistentuniqueid="compUid_2" name="listbox3"></SELECT><SELECT tabIndex=3 class="IBIfield IBI_ReportControlTarget IBI_rounded_s" id=listbox4 style="HEIGHT: 110px; WIDTH: 270px; POSITION: absolute; LEFT: 50px; Z-INDEX: 3; TOP: 310px" size=3 defaultselection="1" persistentuniqueid="compUid_3" name="listbox4"></SELECT> <INPUT id=layoutinfo style="POSITION: absolute; LEFT: -100px; TOP: -100px" type=hidden resourcectrlids="ITEM2;IBI_THEME_CSS" name="inputhidden1"><INPUT id=ibiapp_app style="POSITION: absolute; LEFT: -100px; TOP: -100px" type=hidden value=std_reports ismre="1" name="ibiapp_app"><INPUT id=ibif_ex style="POSITION: absolute; LEFT: -100px; TOP: -100px" type=hidden value=/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz.htm name="ibif_ex"><xml id=focus_xmlelement><script type="text/xml" nextelementuniquenumber="4"><rootxmlnode focoption="_FOC_NULL" top="50" left="10" width="150" height="130"><variables></variables><input_controls><input_control bindcontrolid="compUid_1" elementtype="9" name="listbox1" id="listbox1" multiple="0" inbinding="1" top="20" left="30" width="60" height="20" onetimepopulated="0"><link linktype="default" persistentuniqueid="compUid_1"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0"><data_info datatype="1" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="1" datasource="/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz.fex" ibif_ex="/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz" displayfield="COUNTRY" datafield="COUNTRY" requestid="0" addnoselectionoption="1" dynnoselectiondisplayvalue="- Make Selection -"><![CDATA[]]>
						
</data_info></condition></link></input_control><input_control bindcontrolid="compUid_2" elementtype="9" name="listbox3" id="listbox3" multiple="0" inbinding="1" top="20" left="140" width="60" height="20" onetimepopulated="0"><link linktype="default" persistentuniqueid="compUid_2" from="compUid_1"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="COUNTRY" resolveparameter="COUNTRY"><data_info datatype="1" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="1" datasource="/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz.fex" ibif_ex="/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz" displayfield="CAR" datafield="CAR" requestid="1" addnoselectionoption="1" dynnoselectiondisplayvalue="- Make Selection -"><![CDATA[]]></data_info></condition></link></input_control><input_control bindcontrolid="compUid_3" elementtype="9" name="listbox4" id="listbox4" multiple="0" inbinding="1" top="20" left="250" width="60" height="20" onetimepopulated="0"><link linktype="default" persistentuniqueid="compUid_3" from="compUid_2"><condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="CAR" resolveparameter="CAR"><data_info datatype="1" modifiedrequest="0" sourcetype="typeFex" checkForDuplicateValues="1" datasource="/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz.fex" ibif_ex="/WFC/Repository/itr6g4h7/std_reports/reportsi3mkm/zzzzz" displayfield="MODEL" datafield="MODEL" requestid="2" addnoselectionoption="0" dynnoselectiondisplayvalue="- Make Selection -"><![CDATA[]]></data_info></condition></link></input_control></input_controls><requests nextrequestsid="2"></requests><other_bound_objects></other_bound_objects></rootxmlnode></script>
</xml></BODY>
<SCRIPT type=text/javascript>//confidential_id=IBI_loader
if(typeof doBeforeLoad === 'function'){doBeforeLoad();}function AdjustChildrenPosition(){
}

</SCRIPT>
</HTML>
<!-- cc nyys -->


Copy the fex code into Content where the fex name is : zzzzz (which is the name referred in the HTML)
Copy the HTML code into Content under a new HTML file and look it with the Composer.

It may not have answered all your questions, but may gives you a starting point to work with.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
MartinY,

Thanks for your help and code samples. I'm continuing to look into this. Appreciate the help.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report 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     [RESOLVED] Chaining controls from different data sources?

Copyright © 1996-2020 Information Builders