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     Multiple Dynamic Drop-downs to feed a child drop-down

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Multiple Dynamic Drop-downs to feed a child drop-down
 Login/Join
 
Master
posted
I'm a bit frustrated because I have gotten this to work a couple times, but I simply cannot recreate it.

I am using the HTML GUI builder to build a simple front end that contains 5 drop-downs. They are all backended by FEXs. The basic idea is that the user selects an option from the first and only sees options in the second pertinent to the first (and so on down the line). When you get to the last option, you can only see the values that exist where all the previous values equal what's selected. I can get this to work fairly easily, there is no magic.

Due to a customer requirement, I created another level that, in effect, has a drop-down that fills based on another criteria.

Recap:
BTW, This is supposed to represent the field label and drop-down box:
Label Name: [______________][V]

** Kinda nice, I thought. ;-)

Started out:
     Entity: [______________][V]
       Unit: [______________][V]
Measurement: [______________][V]
Fiscal Year: [______________][V]

[Reset]    [Submit]


After the customer was demo'd the question came up, "Well what about Service Lines? (a missed requirement). Service Lines are peers of units. Groups of them, if you will. So now the front end looks like so:
          Entity:  [______________][V]
[Select By...][V]  [______________][V]
     Measurement:  [______________][V]
     Fiscal Year:  [______________][V]

[Reset]    [Submit]


[Select By...] is a static drop-down that has three entries, ERROR (Select By...), Unit and Service Line. Unit and Service Line pass (as values) the field names as they sit in the database.

Here's whats supposed to happen. When a user selects an Entity and 'UNIT', they will see only Units for that entity. If they select Entity and 'Service Line', only Service Lines for that Entity appear.

What I am finding is that the drop-down chaining seems to only support one control chained to another, where this case calls for 2 parent controls be chained to the same child (whereas the other situations are sort of like stair step, 1 -> 2 -> 3 -> 4 (etc) situations).

I've gotten it to work a few times (as intended), but I've made some changes to my Report Fex that is called as the hyperlink destination and I have to reimport it for the new parameter field to be seen and when I do, the wheels fall off. It seems like I have to attempt this 5-10 times and eventually it works. I know a poor developer blames his tools, but I'll run that risk. Any ideas?

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Master
posted Hide Post
I'm the only on doing this?


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Gold member
posted Hide Post
No, not the only one; here's an example I put together a while back and updated a bit just now.
I've removed some of the extra fluff from the form code so as make it easier to read, and
trouble-areas of the code are highlighted.

Here's the form that's built:



ChainExample_CountryList.fex

TABLE FILE CAR
PRINT COUNTRY
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END


ChainExample_BodytypeList.fex

TABLE FILE CAR
SUM BODYTYPE
BY BODYTYPE
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END



ChainExample_CarList.fex

TABLE FILE CAR
PRINT CAR
BY CAR
WHERE COUNTRY EQ '&country'
WHERE BODYTYPE EQ '&bodytype'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END




ChainExample_CarInfo.fex

TABLE FILE CAR
PRINT COUNTRY CAR MODEL BODYTYPE
 SEATS DEALER_COST RETAIL_COST
WHERE COUNTRY EQ '&country'
WHERE BODYTYPE EQ '&bodytype'
WHERE CAR EQ '&car'
ON TABLE PCHOLD FORMAT HTML
END



ChainExample_LaunchPage.htm

<!doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<style type=text/css>
<!--
body.wf_style1 { font-size:100%; background:#D3D3D3; color:maroon; margin: 0; padding: 1em 0.625em 0.625em 1em; }
form.wf_main_form { border-style: solid; border-width: 0.188em; border-color: maroon; padding: 0.625em;
 margin: 0em 0em 1em 0em; z-index: 1; }
form.wf_main_form input { float: left; }
fieldset.wf_main_fieldset { margin-top: 0px; padding: 0em 0.625em 0.625em 0.5em; border-style: solid; 
 border-color: black; border-width: 1px; }
fieldset.wf_main_fieldset label { display: inline-block; width: 8em; margin: 0.313em 0em 0.313em 0.75em; 
 vertical-align: top; float: left; }
fieldset.wf_main_fieldset input { width: 9.3em; margin: 0px; padding: 0.063em; }
fieldset.wf_main_fieldset select { float: left; font-size: 0.813em; width:9.99em;}
div.break_div { clear: both; font-size: 0em; height: 0px; }
#form2_formcaptionid { font-size: 1.2em; padding: 0.313em 0.625em 0.313em 0.625em; float: left; }
#form2Submit { margin: 0.625em 0em 0em 0.313em; background-image: url(/ibi_html/javaassist/ibi/html/describe/run16.gif);
 background-repeat: no-repeat; background-color: lavender; width: 38px; height: 22px; }
#form2Reset { margin: 0.625em 0em 0em 0.625em; background-image: url(/ibi_html/javaassist/ibi/html/describe/reset.gif); 
 background-repeat: no-repeat; background-color: lavender; width: 38px; height: 22px; }
#divReportInfo h1 { text-decoration: underline; font-weight: bold; font-size: 1.2em; }
#divReportInfo h2 { font-weight: bold; font-size: 1em; vertical-align: text-bottom; display: inline; }
#divReportInfo span.example { color: #0000AA; }
#form2 {width: 39.375em;}
#divReportInfo {min-width: 18.75em; max-width: 40em; }
#report1 {margin: 0em 1em 1em 0em; width: 41em; height: 10em; border-color: black;}
#divReportInfo {min-width: 18.75em; max-width: 40.75em;}
-->
</style>

<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>Chained List Boxes</title>




<script id=clientEventHandlersJS type=text/javascript>
   function window_onload() {
       UpdateData();
   }
</script>



<script for=window eventname="onload">window.onload = function() { window_onload(); }</script>

</head>
<body class="wf_style1" edaconnectionrequired="true">
<div id=form2_formcaptionid tabIndex=-1 formcaption="1">
   Chained List Box Example
</div>
<div class=break_div></div>

<form id=form2 class="wf_main_form"  tabIndex=-1 name=form2 onsubmit="OnExecute(this);return false;" method=post requests_list="0" form_dist_between_desc_and_input="10" form_hor_dist_between_controls="10" vert_dist_between_controls="10" form_number_of_columns="4" form_number_of_visible_rows="4" form_prompt_location="1" default_slider_type="4" fexlist_list="report1">

<fieldset id=form2_formbodyid class="wf_main_fieldset"  tabIndex=-1 formbody="1" tempwidth="188" tempheight="72">
<legend>Parameters:</legend>



<!-- ***** Country ***** -->
<label for=lstCountry class="one_and_half_col">Country:
<select id=lstCountry class="one_and_half_col" inchainindex="1" chainnumber="0"  tabIndex=1 size=1 name=country sourcetype="typeFex" datatype="1" boundtovariable="1" datasource="app/chainexample_countrylist.fex" accept="0" addalloption="0" datafield="COUNTRY" displayfield="COUNTRY" IBIMR_domain="robwagne/robwagne.htm" IBIMR_folder="#testreportst" IBIMR_dir="#bannerreport" ibiapp_app cacheruntimedata="0">
</select>
</label>

<!-- ***** Body Type ***** -->
<label for=lstBodyType class="one_and_half_col">Body Type:
<select id=lstBodyType class="one_and_half_col" inchainindex="2" chainnumber="0"  tabIndex=2 size=1 name=bodytype sourcetype="typeFex" datatype="1" boundtovariable="1" datasource="app/chainexample_bodytypelist.fex" accept="0" addalloption="0" datafield="BODYTYPE" displayfield="BODYTYPE" IBIMR_domain="robwagne/robwagne.htm" IBIMR_folder="#testreportst" IBIMR_dir="#bannerreport" ibiapp_app cacheruntimedata="0">
</select>
</label>

<!-- ***** Car ***** -->
<label for=lstCar class="one_and_half_col">Car:
<select id=lstCar class="one_and_half_col" inchainindex="3" chainnumber="0"  tabIndex=3 size=1 name=car sourcetype="typeFex" datatype="1" boundtovariable="1" datasource="app/chainexample_carlist.fex" accept="0" addalloption="0" datafield="CAR" displayfield="CAR" IBIMR_domain="robwagne/robwagne.htm" IBIMR_folder="#testreportst" IBIMR_dir="#bannerreport" ibiapp_app cacheruntimedata="0" attvariables="country;bodytype;">
</select>
</label>



<div class="break_div"></div>
</fieldset>

<input id=form2Submit  tabIndex=4 type=submit value=" " name=ITEM1>
<input id=form2Reset  tabIndex=5 type=reset value=" " name=reset1>
<div class="break_div"></div>

<input id=IBIMR_dir  type=hidden value=#bannerreport name=IBIMR_dir>



<input id=layoutinfo  type=hidden inputcontrolids="lstCountry;lstBodyType;lstCar;IBIMR_dir" schedulecontrolids="form2Schedule">



<input id=IBIMR_domain  type=hidden value=robwagne/robwagne.htm name=IBIMR_domain>
<input id=IBIMR_dir  type=hidden value=#bannerreport name=IBIMR_dir>
<input id=IBIMR_folder  type=hidden value=#testreportst name=IBIMR_folder>
<input id=ibif_ex  type=hidden value=app/chainexample_launchpage.htm name=ibif_ex>
<input id=ibiapp_app  type=hidden value=gold name=ibiapp_app ismre="1">
<input id=ibic_server  type=hidden value=WFNT name=ibic_server>


</form>
<iframe id=report1 title=app/chainexample_carinfo.fex  tabIndex=-1 name=report1 elementtype="2" autoExecute="False" WIDTHOLD="610" HEIGHTOLD="280" requests_list="0" executebuttonId="form2Submit">
</iframe>

<!-- ***** User instructions: ***** -->
<div id="divReportInfo">

<h1>Data:</h1>
<p>
    This report demonstrates list box chaining where one list box is
fead by multiple inputs.</p>

<h1>Parameters:</h1>

<h2>Country</h2> - This independent parameter feeds both the Car list box and the final report.
<p />

<h2>Body Type</h2> - This independent parameter feeds both the Car list box and the final report.
<p />

<h2>Car</h2> - This list box is populated based on your selections for Country and Body Type.
<p />

</div>

<!-- End instructions -->



<script id=IBI_ChainScript type=text/javascript>
<!--
window.chain0=new Array(1);
window.chain0[0]=new String("lstCountry;lstBodyType;lstCar");
window.chain0[1]=0
//--></script>



<xml id=ibi_requests>
<script>

<requests>
 <request requestid="0" targettype="iframe" targetname="report1" sourcetype="typeFex" ibif_ex="app/chainexample_carinfo.fex" IBIMR_domain="robwagne/robwagne.htm" IBIMR_folder="#testreportst" IBIMR_dir="#bannerreport" IBIMR_sub_action="MR_STD_REPORT" ibiapp_app="" activereport="0" reportcolumns="">
  <variables>
   <variable field="country" datatype="0" name="country" type="unresolved"></variable>
   <variable field="bodytype" datatype="0" name="bodytype" type="unresolved"></variable>
   <variable field="car" datatype="0" name="car" type="unresolved"></variable>
  </variables>
 </request>
</requests>
</script>
</xml>
</body>
<script id=IBI_loader type=text/javascript>
doBeforeLoad();
</script>
</html>


For each chained control, check the following attributes:

cacheruntimedata="0" inchainindex="1" chainnumber="0" newchainnumber="0" datatype="1" 


The values for attributes should typically be as shown, except "inchainindex" which should increment starting with 1 for each list box in the chain.

Each of the listboxes in the chain must be listed in the hidden "layoutinfo" input, as well as in the
window.chain0 variable.

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


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 88 | Location: MI | Registered: July 23, 2009Report This Post
Master
posted Hide Post
Rob, thanks so much for the feedback, i'm going to give this some attention today and try to come to a resolution.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Master
posted Hide Post
Rob,
What are you using to write your HTML? That's not HTML Builder output. That's not even HTML Builder you've prettied up...

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report 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     Multiple Dynamic Drop-downs to feed a child drop-down

Copyright © 1996-2020 Information Builders