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     Chain Static List of 5 drop downs for BY Fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Chain Static List of 5 drop downs for BY Fields
 Login/Join
 
Gold member
posted
I have an accordion report that is using prompts to allow the user to select different by levels. Since I have predefined the first 3 BYs, they can choose NONE, or one or more additional fields to go down a level BY. The values are static (predefined) in each drop down list box and are the same, would like to learn how to adjust the subsequent list box, so as the user chooses values the subsequent choices will exclude the choice made in the previous list box. I was told this could be done with HTML composer, but after looking at some posts and documentation, I was unable to understand the technique. I did go through the initial set up with the HTML composer wizard, but when got to the chain window was stuck on how to proceed. Using the car example provided by IBI, here is an example. "Level n" is a drop down list box: (Hope this lines up)

Level 1    Level 2    Level 3    Level 4
NONE       NONE       NONE       NONE
CAR        CAR        CAR        CAR
COUNTRY    COUNTRY    COUNTRY    COUNTRY
MODEL      MODEL      MODEL      MODEL 


Let's say user wants BY COUNTRY CAR and MODEL then as user clicks on the choices the list boxes to look like this:

 
Level 1    Level 2    Level 3    Level 4
NONE       NONE       NONE       NONE
CAR        COUNTRY    MODEL      
COUNTRY    MODEL      
MODEL                 
 


Here is current code sample with CAR
 
SET ASNAMES = ON
 SET EXPANDBYROW=ON

 -PROMPT &SORT1.(ALL,CAR,COUNTRY,MODEL,BODYTYPE).First Sort.
 -PROMPT &SORT2.(ALL,CAR,COUNTRY,MODEL,BODYTYPE).Second Sort.
 -PROMPT &SORT3.(ALL,CAR,COUNTRY,MODEL,BODYTYPE).Third Sort.
 -PROMPT &SORT4.(ALL,CAR,COUNTRY,MODEL,BODYTYPE).Fourth Sort.
 -SET &SORT1 = IF &SORT1 EQ 'ALL' THEN '_FOC_NULL' ELSE &SORT1 ;
 -SET &SORT2 = IF &SORT2 EQ 'ALL' THEN '_FOC_NULL' ELSE &SORT2 ;
 -SET &SORT3 = IF &SORT3 EQ 'ALL' THEN '_FOC_NULL' ELSE &SORT3 ;
 -SET &SORT4 = IF &SORT4 EQ 'ALL' THEN '_FOC_NULL' ELSE &SORT4 ;
 -SET &BYSORT1= IF &SORT1 EQ ' ' THEN ' ' ELSE 'BY ' | &SORT1;
 -SET &BYSORT2= IF &SORT2 EQ ' ' THEN ' ' ELSE 'BY ' | &SORT2;
 -SET &BYSORT3= IF &SORT3 EQ ' ' THEN ' ' ELSE 'BY ' | &SORT3;
 -SET &BYSORT4= IF &SORT4 EQ ' ' THEN ' ' ELSE 'BY ' | &SORT4;
TABLE FILE CAR
SUM SALES
&BYSORT1
&BYSORT2
&BYSORT3
&BYSORT4
ON TABLE NOTOTAL
END

 


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
caveat: im in 7.6.8, so things may have improved...
write a launch page, rather than prompts.
are you ok with that?
if not, bail out now.
if so, continue reading.
in 7.6.8, in your launch page set up 4 dropdown lists, write 4 fexes, you'll populate your 4 lists with dynamic not static, and with procedure , not data source.
ok so far?
Say your parms are &level1, &level2, &level3, &level4
and you have a file (or you make one) containing a field called LEVEL and the values in LEVEL are NONE, CAR, COUNTRY, MODEL
then your first fex is
TABLE FILE myfile
PRINT LEVEL
ON TABLE PCHOLD
END
..and you get your list of 4
then your 2nd fex is
-DEFAULT &level1 = ' ';
TABLE FILE myfile
PRINT LEVEL
IF LEVEL NE &level1
ON TABLE PCHOLD
END
...
and your 3rd fex is
-DEFAULT &level1 = ' ';
-DEFAULT &level2 = ' ';
TABLE FILE myfile
PRINT LEVEL
IF LEVEL NE &level1
IF LEVEL NE &level2
ON TABLE PCHOLD
END
... ok so far? now you write the 4th fex....
...
now chain them, using the chain tool
now here's the trick, in 7.6.8, you then have to open the html code and change 'cacheruntimedata=1' to 'cachruntimedata=0'
and you do that 4 times for each of the 4 parameter names.




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
Gold member
posted Hide Post
Hi Susannah,

Thank you for the steps. I'm willing to give it a try, but would like to know how I can create the table containing the field values for Level. Those Items are the names of the field and are not data, so I can't create it with a Print statement since I don't have a table containing that information to start with or am I missing something.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
quick and dirty way
DEFINE FILE IBISAMP/CAR
LEVEL/A10=DECODE COUNTRY ('ENGLAND' 'NONE' 
                           'JAPAN'  'CAR'
                           'ITALY'  'COUNTRY' ELSE 'MODEL');
LEVELORDER/I1=DECODE LEVEL ('NONE' 1 'CAR' 2 'COUNTRY' 3 ELSE 4);
END
TABLE FILE IBISAMP/CAR
SUM LEVEL BY LEVELORDER NOPRINT
ON TABLE PCHOLD
END

fancier way coming...when i get a minute
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
flexible way, can be adapted to any situation.
file resides in the agent, and vanishes into thin air when the fex is completed.

FILEDEF myfile DISK myfile.mas
-RUN
-WRITE myfile FILENAME=myfile, SUFFIX=FIX  , $
-WRITE myfile SEGMENT=myfile, SEGTYPE=S0, $
-WRITE myfile FIELDNAME=LEVEL, ALIAS=LEVEL, USAGE=A8, ACTUAL=A8, $
-CLOSE myfile
FILEDEF myfile DISK myfile.TXT
-RUN
-WRITE myfile NONE
-WRITE myfile CAR
-WRITE myfile COUNTRY
-WRITE myfile MODEL
-CLOSE myfile
-RUN
TABLE FILE myfile PRINT LEVEL ON TABLE PCHOLD
END




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
Gold member
posted Hide Post
Hi Susannah,

Thank you for the code to create the field names as data for the level prompts. I got that part working, but haven't been able to get the html composer part working. I get an error (FOC205) The description cannot be found for file named: levellist. When I look at the Properties and settings of the comboboxes, the code I typed (from your earlier example) is gone. When I set up initially, I clicked on the Parameters Tab at the bottom of HTML Composer, then I right clicked on combobox1 and chose properties and settings. Then I clicked on External Procedure and in the big text area typed in your code (modifying it for my actual information). I left all the other fields as they were except I deleted the information in the text box between External Procedure and Value field. Value field and Display field were blank already. I didn't see an ok box so I clicked on the X in the right corner to close the window. I did similar for the other comboboxes, then saved the file.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
you want to put the code in a .fex in your app or in your domain, you don't want it in the html page. you point to the fexname, you don't type in the code. you want your dropdown fexes to be on the default path of that domain.
are you in MRE or are you on the backend writing something in the apps directory?

i don't know anything about a big text area when you pick 'external procedure'...if that's something in 7.7, i've got a headache.




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
Gold member
posted Hide Post
Hi Susannah,

I appreciate your help on this. I created the fex files and then chose them in the properties window. It automatically filled in the big text area with the code from the fex. Now it shows the field names in the drop down without the error message. I thought I had them chained, but must still be missing something because it is not reducing the choices and I could not locate the cacheruntimedata=1 in the html (I assume you meant to click on the tab that says html). There is an option in the properties window for Cache run time data. I left that unchecked hoping that would be the same as changing it to 0 in the html if I could find it.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
hmmm. i only have 6.8, so devstu in 7.7 must be different.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
I'm not sure you can use chaining to reduce the number of values in a dropdown box based on prior selections quite like you require.

For example, you would be able to chain Country, State, City dropdown boxes: select a Country - only States in that Country will be shown; select a State - only Cities in that State would be shown.

In your scenario, you would like to eliminate previously selected values - I don't think there's a GUI, automated way of doing this with HTML Composer.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
HTML Composer is not an intuitive GUI tool. (There, I've said it).

It doesn't seem to be suggested in the documentation, but I recently learned that you should write the report fex BEFORE creating a GUI HTML Composer launch page.

In Dev Studio Report Painter, there is an option to parameterize report columns. You put report columns in the report. Then you select one or more column and you select an option in the wide dropdown box that has two values "One variable for each selected column" and "One variable for all selected columns". (Documented in Creating Reports With Report Painter > Creating Guided Reports".) This replaces the previously selected column names by Dialogue Manager variables, including possible values.

Then you create a new HTML Composer page. I don't know if I'm doing the next step correctly (because annoying things happen - a second Reset button is added, the form objects are at the bottom of the form... annoying), but I add a new form. Then I select the Run button and add a hyperlink to point to the previously created fex. You get the option to create controls that are in the fex - select yes.

In my example below, I chained the three column dropdown boxes, but I cannot make them react the way you'd like - none of the obscure-looking chaining options suggests what you want is possible.

I have included code here. Create these two files in your baseapp application folder. Run the HTML file.

fpsxschech1.htm:
<!-- Generated by Report Layout Painter -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7703, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>
 
<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";
 
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 type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>
 
<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>
 
<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>
 
<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</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
</SCRIPT>
 
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="3" thumbnailscale="4" elementtype="21" edaconnectionrequired="true">
<FORM style="Z-INDEX: 2; POSITION: absolute; WIDTH: 810px; HEIGHT: 440px; TOP: 10px; LEFT: 10px" id=form1 onsubmit="OnExecute(this);return false;" method=post requests_list="0" form_newline_chain="1" default_slider_type="4" form_type="1" 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" name="form1">
<FORM style="Z-INDEX: 5; POSITION: absolute; WIDTH: 697px; HEIGHT: 120px; TOP: 13px; LEFT: 15px" id=form2 form_newline_chain="1" default_slider_type="4" form_type="1" 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" name="form2" tempheight="120" tempwidth="697" fexlist_list="form1Submit" method="post">
<LABEL style="Z-INDEX: 8; POSITION: absolute; WIDTH: 212px; HEIGHT: 22px; TOP: 5px; CURSOR: default; LEFT: 5px" id=label1 tabIndex=6 for=combobox1 name="combobox1">Please select sort field(s)</LABEL> 
<SELECT style="Z-INDEX: 9; POSITION: absolute; OVERFLOW-Y: visible; WIDTH: 131px; OVERFLOW: visible; TOP: 37px; LEFT: 5px" id=combobox1 tabIndex=7 size=1 defaultselection="1" defaultlocation="0,0,25,111" boundtovariable="1" requiredfield="1" persistentuniqueid="compUid_1" name="combobox1"> 
<OPTION selected value=CAR.ORIGIN.COUNTRY noinput="0" displaytext="COUNTRY">COUNTRY</OPTION>
<OPTION value=CAR.COMP.CAR noinput="0" displaytext="CAR">CAR</OPTION>
<OPTION value=CAR.CARREC.MODEL noinput="0" displaytext="MODEL">MODEL</OPTION>
<OPTION value=_FOC_NULL noinput="0" displaytext="None">None</OPTION></SELECT> 
<LABEL style="Z-INDEX: 10; POSITION: absolute; WIDTH: 212px; HEIGHT: 22px; TOP: 5px; CURSOR: default; LEFT: 227px" id=label2 tabIndex=8 for=combobox2 name="combobox2">Please select sort field(s)</LABEL> 
<SELECT style="Z-INDEX: 11; POSITION: absolute; OVERFLOW-Y: visible; WIDTH: 131px; OVERFLOW: visible; TOP: 37px; LEFT: 227px" id=combobox2 tabIndex=9 size=1 defaultselection="1" defaultlocation="0,0,25,111" boundtovariable="1" requiredfield="1" persistentuniqueid="compUid_2" name="combobox2"></SELECT> 
<LABEL style="Z-INDEX: 12; POSITION: absolute; WIDTH: 212px; HEIGHT: 22px; TOP: 5px; CURSOR: default; LEFT: 449px" id=label3 tabIndex=10 for=combobox3 name="combobox3">Please select sort field(s)</LABEL> 
<SELECT style="Z-INDEX: 13; POSITION: absolute; OVERFLOW-Y: visible; WIDTH: 131px; OVERFLOW: visible; TOP: 37px; LEFT: 449px" id=combobox3 tabIndex=11 size=1 defaultselection="1" defaultlocation="0,0,25,111" boundtovariable="1" requiredfield="1" persistentuniqueid="compUid_3" tempatt_lastelement_ofline="1" name="combobox3"></SELECT> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/reset.gif); Z-INDEX: 6; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 97px; LEFT: 95px" id=form2Reset tabIndex=4 value=" " type=reset StyleBack_UserSuppliedFullPath="1" name="reset2"> 
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/run16.gif); Z-INDEX: 3; POSITION: absolute; BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 90px; LEFT: 14px" id=form1Submit tabIndex=2 value=" " type=submit StyleBack_UserSuppliedFullPath="1" autoExecute="false" name="submit1"></FORM></FORM>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden resourcectrlids="form2Reset;form1Submit">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=baseapp type=hidden name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibic_server value=EDASERVE type=hidden isdataserversarea="1" name="ibic_server">
<xml id=focus_xmlelement>
<script type="text/xml" nextelementuniquenumber="4">
	
<rootxmlnode focoption="_FOC_NULL" top="100" left="10" width="150" height="130">
		
<variables>
			
<variable controltype="8" parametercreatedinreslay="0" type="unresolved" desc="Please select sort field(s)" name="RP_FL01B01_Sort1" default="" textvarname="" accept="0" select="0" create="1" top="70" left="30" width="60" height="20" inbinding="1">
				
<link linktype="default" from="compUid_1">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="RP_FL01B01_Sort1" datafield="RP_FL01B01_Sort1" datasource="car.mas" datatype="0" selectedvalue="" operation="" slider_range_from="" slider_range_to="" previewvalue="CAR.ORIGIN.COUNTRY" sourcetype="typeMaster">
							
<static_values>
								
<static value="CAR.ORIGIN.COUNTRY" display="COUNTRY" selected="1" noinput="0"></static>
								
<static value="CAR.COMP.CAR" display="CAR" selected="0" noinput="0"></static>
								
<static value="CAR.CARREC.MODEL" display="MODEL" selected="0" noinput="0"></static>
								
<static value="_FOC_NULL" display="None" selected="0" noinput="0"></static></static_values></data_info></condition></link>
				
<requestid id="0"></requestid></variable>
			
<variable controltype="8" parametercreatedinreslay="0" type="unresolved" desc="Please select sort field(s)" name="RP_FL02B02_Sort2" default="" textvarname="" accept="0" select="0" create="1" top="70" left="140" width="60" height="20" inbinding="1">
				
<link linktype="default" from="compUid_2">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="RP_FL02B02_Sort2" datafield="RP_FL02B02_Sort2" datasource="car.mas" datatype="0" selectedvalue="" operation="" slider_range_from="" slider_range_to="" previewvalue="CAR.ORIGIN.COUNTRY" sourcetype="typeMaster">
							
<static_values>
								
<static value="CAR.ORIGIN.COUNTRY" display="COUNTRY" selected="1" noinput="0"></static>
								
<static value="CAR.COMP.CAR" display="CAR" selected="0" noinput="0"></static>
								
<static value="CAR.CARREC.MODEL" display="MODEL" selected="0" noinput="0"></static>
								
<static value="_FOC_NULL" display="None" selected="0" noinput="0"></static></static_values></data_info></condition></link>
				
<requestid id="0"></requestid></variable>
			
<variable controltype="8" parametercreatedinreslay="0" type="unresolved" desc="Please select sort field(s)" name="RP_FL03B03_Sort3" default="" textvarname="" accept="0" select="0" create="1" top="70" left="250" width="60" height="20" inbinding="1">
				
<link linktype="default" from="compUid_3">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="RP_FL03B03_Sort3" datafield="RP_FL03B03_Sort3" datasource="car.mas" datatype="0" selectedvalue="" operation="" slider_range_from="" slider_range_to="" previewvalue="CAR.ORIGIN.COUNTRY" sourcetype="typeMaster">
							
<static_values>
								
<static value="CAR.ORIGIN.COUNTRY" display="COUNTRY" selected="1" noinput="0"></static>
								
<static value="CAR.COMP.CAR" display="CAR" selected="0" noinput="0"></static>
								
<static value="CAR.CARREC.MODEL" display="MODEL" selected="0" noinput="0"></static>
								
<static value="_FOC_NULL" display="None" selected="0" noinput="0"></static></static_values></data_info></condition></link>
				
<requestid id="0"></requestid></variable></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_1" elementtype="8" name="combobox1" id="combobox1" multiple="0" inbinding="1" top="20" left="30" width="60" height="20" onetimepopulated="1">
				
<link linktype="default" persistentuniqueid="compUid_1">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" datatype="0" datasource="car.mas" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" accept="0" operation="NONE">
							
<static_values>
								
<static value="CAR.ORIGIN.COUNTRY" display="COUNTRY" selected="1" noinput="0"></static>
								
<static value="CAR.COMP.CAR" display="CAR" selected="0" noinput="0"></static>
								
<static value="CAR.CARREC.MODEL" display="MODEL" selected="0" noinput="0"></static>
								
<static value="_FOC_NULL" display="None" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control>
			
<input_control bindcontrolid="compUid_2" elementtype="8" name="combobox2" id="combobox2" multiple="0" top="20" left="140" width="60" height="20" inbinding="1" onetimepopulated="0">
				
<link linktype="default" from="compUid_1" persistentuniqueid="compUid_3">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" datatype="0" datasource="car.mas" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" accept="0" operation="NONE">
							
<static_values>
								
<static value="CAR.ORIGIN.COUNTRY" display="COUNTRY" selected="1" noinput="0"></static>
								
<static value="CAR.COMP.CAR" display="CAR" selected="0" noinput="0"></static>
								
<static value="CAR.CARREC.MODEL" display="MODEL" selected="0" noinput="0"></static>
								
<static value="_FOC_NULL" display="None" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control>
			
<input_control bindcontrolid="compUid_3" elementtype="8" name="combobox3" id="combobox3" multiple="0" top="20" left="250" width="60" height="20" inbinding="1" onetimepopulated="0">
				
<link linktype="default" from="compUid_2" persistentuniqueid="compUid_2">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" datatype="0" datasource="car.mas" addalloption="0" sourcetype="typeMaster" cacheruntimedata="0" accept="0" operation="NONE">
							
<static_values>
								
<static value="CAR.ORIGIN.COUNTRY" display="COUNTRY" selected="1" noinput="0"></static>
								
<static value="CAR.COMP.CAR" display="CAR" selected="0" noinput="0"></static>
								
<static value="CAR.CARREC.MODEL" display="MODEL" selected="0" noinput="0"></static>
								
<static value="_FOC_NULL" display="None" selected="0" noinput="0"></static></static_values></data_info></condition></link></input_control></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests nextrequestsid="1">
			
<request requestid="0" sourcetype="typeFex" targettype="window" targetname="_blank" ibif_ex="fpsxschech1.fex" activereport="0" reportcolumns="" reportrealcolumns="" ibiapp_app="baseapp"></request></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>

fpsxschech1.fex
-* File fpsxschech1.fex
-SET &ECHO='ALL';
TABLE FILE CAR
SUM
     CAR.BODY.SEATS
BY  LOWEST &RP_FL01B01_Sort1.(<COUNTRY,CAR.ORIGIN.COUNTRY>,<CAR,CAR.COMP.CAR>,<MODEL,CAR.CARREC.MODEL>,<None,_FOC_NULL>).Please select sort field(s).
BY  LOWEST &RP_FL02B02_Sort2.(<COUNTRY,CAR.ORIGIN.COUNTRY>,<CAR,CAR.COMP.CAR>,<MODEL,CAR.CARREC.MODEL>,<None,_FOC_NULL>).Please select sort field(s).
BY  LOWEST &RP_FL03B03_Sort3.(<COUNTRY,CAR.ORIGIN.COUNTRY>,<CAR,CAR.COMP.CAR>,<MODEL,CAR.CARREC.MODEL>,<None,_FOC_NULL>).Please select sort field(s).
ON TABLE SET ONFIELD IGNORE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END


One can write custom JavaScript to do this, I'm not sure you want to go that route.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Hi Francis,

Thank you for taking a look at this and providing the code. Since it seems chaining may not work for this situation, maybe I'll need to add a bunch of If statements to ignore the sort fields if it has previously been chosen so that I don't get the field multiple times as is the case now if user selects the same field in more than one box.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
I'm hoping someone smarter than me can take the sample code and make the chaining work like you require. Your requirement seems a reasonable expectation of the GUI.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Designing a User Interface for a Web Application With the HTML Composer > Chaining Controls for Dependencies in the HTML Composer > Applying Conditions to a Chain

I cannot understand this documentation...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Ok, taking the lead that Susannah and Francis began.

Create a new procedure and call it sxschech_combo and place the following code within it. It is basically Susannah's fex but modified slightly. It defaults 3 variables &Level1, &Level2 and &Level3. The example won't use &Level3 but it is there to whet the taste buds. The fex will build a dynamic dataset and report from it to an XML output. The selection will be restricted by the value of the 3 variables.

-* File sxschech_combo.fex
-SET &ECHO = ALL;
-DEFAULT &Level1 = 'FOC_NONE'
-DEFAULT &Level2 = 'FOC_NONE'
-DEFAULT &Level3 = 'FOC_NONE'
FILEDEF myfilemas DISK myfile.mas
FILEDEF myfile DISK myfile.TXT
-RUN
-WRITE myfilemas FILENAME=myfile, SUFFIX=FIX  , $
-WRITE myfilemas SEGMENT=myfile, SEGTYPE=S0, $
-WRITE myfilemas FIELDNAME=LEVEL, ALIAS=LEVEL, USAGE=A8, ACTUAL=A8, $
-WRITE myfile NONE
-WRITE myfile CAR
-WRITE myfile COUNTRY
-WRITE myfile MODEL
-RUN
TABLEF FILE myfile
SUM FST.LEVEL
 BY LEVEL
WHERE LEVEL NE '&Level1'
WHERE LEVEL NE '&Level2'
WHERE LEVEL NE '&Level3'
ON TABLE PCHOLD FORMAT XML
END


Now create a new HTML page using composer. Place a single combo onto the page (I'm not going to teach you how to do the rest). Go to properties and change the NAME attribute to Level1.

Now click on the parameters tab. Select the new Level1 icon and right click choosing properties and settings. Select dynamic data type and external procedure. Click on the ellipsis "..." button and navigate to the fex created above. Enter the value and display values as LEVEL (for some reason these do not get populated automatically - probably because of the fex content!).

Next, create another 2 combos and follow the same procedure above except change the NAME attribute to Level2 and Level3.

Select the design tab and select the first combo (named Level1). Hold the control key and subsequently click Levl2 combo and then Levle3 combo. This is the chaining process (one of a few methods).

I had a glitch at this stage because the control didn't work the way I expected. I had to go to the HTML and change the values for "resolveparameterfq" and "resolveparameter" from LEVEL to Level1 for the second combo and to Level2 for the third combo.

When run, the second and third combos are affected by what is selected in the previous combo(s) such that if you select CAR in the first, only NONE, COUNTRY and MODEL are shown in the second combo, and if you then select COUNTRY n the second combo, only NONE and MODEL are shown in the third combo. You can see that if you add a fourth combo and apply the same external procedure he variable &Level3 will come into play.

Now I know that this doesn't completely give you your ultimate goal but it must surely give you enough knowledge to be going on with.

T

Had to edit it a few times because the speel chucker was on holiday Frowner



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
Hi Tony A,

I followed your steps as best I could. Here is the result. Before modifying the HTLM, I ran to see what would happen. The combo boxes populated and when I clicked on the first box, all the others changed to that value, I assume that is the glitch you mentioned. Next I went into the html and changed the LEVEL in the resolveparameterfq and resolveparameter to LEVEL1, 2 and 3 respectively. After doing that I reran and all the drop down boxes show everything, so I must have missed a step or didn't modify the html correctly.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
I specifically typed Level1, Level2 and Level3, because they are the variables names used in the procedure.

Change your LEVELn values accordingly.

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
Thanks Tony,

First the good news...That worked. I also needed to modify this part of ComboFex because I wanted the default option to be NONE and have NONE available in any combo box regardless.

WHERE LEVEL NE '&Sort1' OR LEVEL EQ 'NONE'
WHERE LEVEL NE '&Sort2' OR LEVEL EQ 'NONE'
WHERE LEVEL NE '&Sort3' OR LEVEL EQ 'NONE'


Now the issue is how to get the results of the combo to run the report. I tried adding a button, but don't know how to relate the drop down boxes to the report. I also tried creating a new report and doing the insert report which brought in the list boxes from the fex and automatically created the chain. Then I changed these list boxes to look at ComboFex and the other steps you outlined previously. However, I could not locate the "resolve" in the html. The result is it is not filtering down.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
quote:
I'm not going to teach you how to do the rest

There are some good training courses available for the basics that would help.

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
If you have access to them, there were presentations at Summit 2012 that would clarify some of this for you.


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.
 
Posts: 103 | Registered: April 27, 2011Report This Post
Expert
posted Hide Post
quote:
WHERE LEVEL NE '&Sort1' OR LEVEL EQ 'NONE'
WHERE LEVEL NE '&Sort2' OR LEVEL EQ 'NONE'
WHERE LEVEL NE '&Sort3' OR LEVEL EQ 'NONE'

There is, perhaps, a more convenient (better?) way of doing this and that would be to add the ALL option to each of the combos with the text to be display as NONE. Then remove the -WRITE myfile NONE from the fex (plus your additions).

The all option is always displayed as the first line which I had achieved by using TABLEF instead of TABLE.

Apologies if my previous comment sounds a bit harsh, but I just feel a structured training course would benefit you more. The main advantage would be learning the GUI - which many will confirm, is not an area I tread very often Wink

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
Hi Tony,

Thanks again for your patience on this.

After spending some of Friday and a good part of today, looking at various links etc, the good news is I finally got the chaining to work, at least in testing. The tricky things were figuring out how to manually create the parameters and get them bound -- drag parameter out of unbound box and then drag drop down box onto parameter and it then shows an arrow. When I tried this last week, it didn't work because when I was reading, I only saw them mention to drag the dropdown box onto the parameter, I didn't see it say to move the parameter out of the unbound box first. The other hard part was locating the resolve. Seems when I did ctrl+F to find resolve, the cursor would go back to the top of the document and I'd have to scroll down to locate the highlighted item. Sometimes I still couldn't see it, so I copied and pasted the entire html code into a text editor and searched/replaced there and then copy pasted back into the html tab of HTML Composer. Hope I'm not doing damage to the code by using this method for editing.

Another question, if I may. If I want to give the user the option to type in a value that is not listed in the drop down box (as if it were a text box), can this be done? Reason is that I will provide a set list of values in the combofex file, but for some "power users" they may want to see a particular field that a regular user doesn't need to see (or know about) and also because I'd rather not have to maintain a bigger list than necessary.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report 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     Chain Static List of 5 drop downs for BY Fields

Copyright © 1996-2020 Information Builders