Focal Point
[SOLVED] Chained Combo displaying every other record from XML file

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

August 18, 2009, 05:24 PM
Dgraff
[SOLVED] Chained Combo displaying every other record from XML file
OK I have 2 Combo boxes chained together the first Date Period (monthly, Quarterly, Rolling 12) The second Period Ending Date. I have a fex that extracts the data from a table and saves it PCHOLD format XML. I've done the dynamic procedure and called the fex. When I execute the HTML page it loads the first box correctly. the second box it loads every other record. The XML file looks correct. I've attached the HTML below: Anyone ever seen this before. Or is it something to do with 7.6.7 which I have loaded as a localhost on my desktop for a temp project.

HTML below
< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<META id=UTF-8 http-equiv=Content-Type content="text/html; charset=UTF-8">
<TITLE>HtmlPage</TITLE>
<BASE href=HTTP://localhost:8080>
<META content="MSHTML 6.00.2900.3562" name=GENERATOR>
<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

//Begin function button1_OnClick
function button1_OnClick(ctrl) {
// TODO: Add your event handler code here
OnExecute(ctrl)
}
//End function button1_OnClick
</SCRIPT>

<script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto">
<SELECT id=combobox1 style="Z-INDEX: 1; LEFT: 100px; WIDTH: 180px; POSITION: absolute; TOP: 70px" tabIndex=1 name=DATATYP cacheruntimedata="1" inchainindex="1" chainnumber="0" displayfield addalloption="0" accept="0" operation="NONE" selectedvalue="M" boundtovariable="1" ibiapp_app="ocss" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="dateext.fex"></SELECT>
<SPAN id=text1 style="Z-INDEX: 2; LEFT: 100px; WIDTH: 180px; POSITION: absolute; TOP: 40px; HEIGHT: 30px" tabIndex=2>Date Period</SPAN>
<SELECT id=combobox2 style="Z-INDEX: 3; LEFT: 350px; WIDTH: 230px; POSITION: absolute; TOP: 70px" tabIndex=3 name=PERENDDT cacheruntimedata="1" inchainindex="2" chainnumber="0" displayfield addalloption="0" accept="0" operation="NONE" selectedvalue="20090731" boundtovariable="1" ibiapp_app="ocss" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datasource="dateext.fex"></SELECT>
<SPAN id=text2 style="Z-INDEX: 4; LEFT: 350px; WIDTH: 230px; POSITION: absolute; TOP: 40px; HEIGHT: 30px" tabIndex=4>Period end date</SPAN>
<INPUT language=java_script id=button1 style="Z-INDEX: 5; LEFT: 250px; WIDTH: 150px; POSITION: absolute; TOP: 150px; HEIGHT: 40px" onclick=button1_OnClick[this) tabIndex=5 type=button value=Submit name=button1 requests_list="0">
<xml id=ibi_requests>
<script>
<requests>
<request requestid="0" sourcetype="typeFex" targettype="window" targetname="_blank" ibif_ex="perf003.fex" ibic_server="EDASERVE" activereport="0" reportcolumns="" ibiapp_app="ocss">
<variables>
<variable parametercreatedinreslay="0" displayfield="DATATYP" format="" field="DATATYP" file="s,.mas" desc="DATATYP" datatype="0" operation="" default="M" name="DATATYP" textvarname="" accept="0" type="default" select="0" min="" max="" controltype="7" create="0"></variable>
<variable parametercreatedinreslay="0" displayfield="PERENDDT" format="" field="PERENDDT" file="s,.mas" desc="PERENDDT" datatype="0" operation="" default="20090731" name="PERENDDT" textvarname="" accept="0" type="default" select="0" min="" max="" controltype="7" create="0"></variable>
<variable parametercreatedinreslay="0" displayfield="LEVEL" format="" field="LEVEL" file="s,.mas" desc="LEVEL" datatype="0" operation="" default="" name="LEVEL" textvarname="" accept="0" type="unresolved" select="0" min="" max="" controltype="7" create="0"></variable>
<variable parametercreatedinreslay="0" displayfield="REGION" format="" field="REGION" file="s,.mas" desc="REGION" datatype="0" operation="" default="" name="REGION" textvarname="" accept="0" type="unresolved" select="0" min="" max="" controltype="7" create="0"></variable></variables></request></requests></script>
</xml></BODY></HTML>

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


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
August 18, 2009, 10:46 PM
j.gross
Please place your code contained within [ code ] ... [ /code ] tags.
August 19, 2009, 01:47 AM
Tony A
Duane,

The usual scenario for this is that you are only retrieving one field within the fex instead of two.

Use the form -
TABLE FILE filename
SUM FST.fieldname
 BY fieldname
ON TABLE PCHOLD FORMAT XML
END
and you shouldn't have too many problems.

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 
August 19, 2009, 06:41 AM
GamP
Yes, Duane, Tony is right.
When you use a fex to populate your listboxes, you have to have exactly two fields in the result set. One is for the item value, the other for the item display. That way you can have codes for the values and descriptions for the display.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 19, 2009, 02:29 PM
Dgraff
Thanks for the help However I needed to Display the both fields twice and the first once???

DEFINE FILE RPT_DT_DIM
RPT_DATATYPE_M/A1='M';
RPT_DATATYPE_Q/A1=IF QTR_END_DT_IND EQ '1' THEN 'Q' ELSE '';
RPT_DATATYPE_P/A1=IF QTR_END_DT_IND EQ '1' THEN 'P' ELSE '';

END
MATCH FILE RPT_DT_DIM
PRINT
RPT_PER_END_DT
BY RPT_DATATYPE_M AS RPT_TYP_CD
BY RPT_PER_END_DT
WHERE RPT_DATATYPE_M EQ 'M';
RUN
FILE RPT_DT_DIM
PRINT RPT_PER_END_DT
BY RPT_DATATYPE_Q AS RPT_TYP_CD
BY RPT_PER_END_DT
WHERE RPT_DATATYPE_Q EQ 'Q';
RUN
FILE RPT_DT_DIM
PRINT RPT_PER_END_DT
BY RPT_DATATYPE_P AS RPT_TYP_CD
BY RPT_PER_END_DT
WHERE RPT_DATATYPE_P EQ 'P';
AFTER MATCH HOLD OLD-OR-NEW
END

DEFINE FILE HOLD
RPT_TYP/A10=DECODE RPT_TYP_CD('M','Monthly','Q','Quarterly','P','Rolling 12');
PER_END_DT/YYMD= HDATE(RPT_PER_END_DT, 'YYMD');
END
TABLE FILE HOLD
PRINT RPT_TYP
PER_END_DT
-* PER_END_DT
BY RPT_TYP
BY HIGHEST PER_END_DT
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982