Focal Point
Chained Controls HTML Composer [SOLVED]

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4677081376

October 20, 2014, 06:11 PM
Luke Forster
Chained Controls HTML Composer [SOLVED]
I am looking to chain contorls for 4 fields (Country -> Buyer -> Warehouse -> Vendor) in the HTML composer.

My first chain is working correctly and when I select a Country I am only getting the Buyers for the selected Country. However when I try to add the chaining to the Warehouse/Vendor dropdowns I am getting a red outline around the drop down box and am unable figure out why.

My paramaters are chained as follows


Country


Buyer


Warehouse


Vendor


The table WF_E3FCA_SUMMARY_GLOBAL is a summary table I am building. Any and all help resolving this is greatly appreciated and please let me know if I need to provide any further information.

Thanks,

-Luke

This message has been edited. Last edited by: Luke Forster,


Web Focus 8105
Windows 7
October 21, 2014, 05:43 AM
Frans
If you use the same table for all selection boxes then you don't need to add the WHERE's. Just remove the WHERE's and link the edits when it should work automatically.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
October 21, 2014, 06:54 AM
Pravin.Singh
Chaining will work when you use same xml file to populate all the dropdowns. No need to give filters on different xml's. Just use one xml with all the columns selected and give chaining. It will work.

Thanks,
Pravin Singh


WebFOCUS 7703
Windows, All Outputs
pravinsinghwebfocus.blogspot.com
October 21, 2014, 07:02 AM
Wep5622
AFAIK, the chaining in HTML composer is only capable of passing a single parameter. That would work between your first and second inputs, but not after that as those require 2 and 3 parameters respectively.

A possible work around is to pass on a concatenation of the previous values, but those same values will be what gets posted to your procedure so you may need to split them again there to be able to use them.

The red outline usually means you omitted to select a value in a required field - fields default to 'required' in HTML Composer. Check your properties tab if that's not what you intended.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
October 21, 2014, 07:32 AM
Frans
and if you do want to use custom filters, make sure you include your preceding filters in a BY


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
October 21, 2014, 10:13 AM
Luke Forster
quote:
Originally posted by Frans:
If you use the same table for all selection boxes then you don't need to add the WHERE's. Just remove the WHERE's and link the edits when it should work automatically.


As you mentioned I am using the same table for all of the chained selection boxes. That said when I remove the WHERE's the chaining is still not working.

The dropdowns are now all populated with the correct data but if I select a country it still displays buyers globally instead of just the applicable records for the selected country.


Web Focus 8105
Windows 7
October 21, 2014, 11:35 AM
MartinY
Can you provide the code you are using to generate your XML file ?
Post the code using the "code" tag, not an image please.


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
October 21, 2014, 01:17 PM
Luke Forster
quote:
Originally posted by MartinY:
Can you provide the code you are using to generate your XML file ?
Post the code using the "code" tag, not an image please.


Please let me know if the below is not what you are asking for. Not sure if any of this matters but I am using a dynamic embeded procedure and am adding an All option to each of these drop down lists.

Country
 TABLE FILE WF_E3FCA_SUMMARY_GLOBAL
SUM FST.WF_E3FCA_SUMMARY_GLOBAL.SEG01.COUNTRY
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.COUNTRY
ON TABLE PCHOLD FORMAT XML
END 


Buyer
 TABLE FILE WF_E3FCA_SUMMARY_GLOBAL
SUM FST.WF_E3FCA_SUMMARY_GLOBAL.SEG01.BUYER_NAME
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.BUYER_NAME
ON TABLE PCHOLD FORMAT XML
END
 


Warehouse
TABLE FILE WF_E3FCA_SUMMARY_GLOBAL
SUM FST.WF_E3FCA_SUMMARY_GLOBAL.SEG01.WAREHOUSE
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.WAREHOUSE
ON TABLE PCHOLD FORMAT XML
END 


Vendor
 TABLE FILE WF_E3FCA_SUMMARY_GLOBAL
SUM FST.WF_E3FCA_SUMMARY_GLOBAL.SEG01.VENDOR_ID
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.VENDOR_ID
ON TABLE PCHOLD FORMAT XML
END 


-Luke


Web Focus 8105
Windows 7
October 21, 2014, 01:25 PM
MartinY
To use the chaining (and auto-filter based on selection), your XML file must contain all the data :
 TABLE FILE WF_E3FCA_SUMMARY_GLOBAL
SUM WF_E3FCA_SUMMARY_GLOBAL.SEG01.COUNTRY
    WF_E3FCA_SUMMARY_GLOBAL.SEG01.BUYER_NAME
    WF_E3FCA_SUMMARY_GLOBAL.SEG01.WAREHOUSE
    WF_E3FCA_SUMMARY_GLOBAL.SEG01.VENDOR_ID
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.COUNTRY
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.BUYER_NAME
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.WAREHOUSE
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.VENDOR_ID
ON TABLE PCHOLD FORMAT XML
END 

The same code must be used to all your controls : country, buyer, warehouse, vendor. Then choose proper BY and SUM field for respectively "Display field" and "Value field" of the control.


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
October 21, 2014, 05:20 PM
Luke Forster
quote:
Originally posted by MartinY:
To use the chaining (and auto-filter based on selection), your XML file must contain all the data :
 TABLE FILE WF_E3FCA_SUMMARY_GLOBAL
SUM WF_E3FCA_SUMMARY_GLOBAL.SEG01.COUNTRY
    WF_E3FCA_SUMMARY_GLOBAL.SEG01.BUYER_NAME
    WF_E3FCA_SUMMARY_GLOBAL.SEG01.WAREHOUSE
    WF_E3FCA_SUMMARY_GLOBAL.SEG01.VENDOR_ID
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.COUNTRY
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.BUYER_NAME
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.WAREHOUSE
 BY WF_E3FCA_SUMMARY_GLOBAL.SEG01.VENDOR_ID
ON TABLE PCHOLD FORMAT XML
END 

The same code must be used to all your controls : country, buyer, warehouse, vendor. Then choose proper BY and SUM field for respectively "Display field" and "Value field" of the control.


Thank you so much for your help.

-Luke


Web Focus 8105
Windows 7
October 22, 2014, 08:21 AM
MartinY
My pleasure.

Edit your first post of this thread and add to the title a [SOLVED] tag.


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
October 22, 2014, 10:33 AM
susannah
That's only 1 method of chaining. there are 2.
This first 1 only works for a relatively small set of data, as the entire xml array has to load into the browser in one fell swoop. That may take a long time, or the users browser may give up and fail to load; We call this 'compound';
In the 'complex' method, we would use separate fexes for each dropdown,
with each successive fex containing a filter for all the prior dropdown variables. Tony A and I did a presentation at summit a few years ago on this subject ; 'The Chain Gang' i think was the title of the prez. it may be findable on the ibi site of summit presentations.
In don't know how the composer works in 8 , but in 76, once the page was setup and the variables chained in dev studio, you then had to open the htm file in a text editor and change the settings of 'cacheruntimedata=1' back to 'cacheruntimedata=0'; then it all worked.

the principal difference being:with the 'compound' method , the users selection changes were done in the browser; with the 'complex' method, the users selection meant a trip back to the server for each successive selection.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
October 22, 2014, 11:27 AM
Francis Mariani
quote:
In the 'complex' method, we would use separate fexes for each dropdown




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