Focal Point
Populating Drop Down lists with Custom System variables

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

September 24, 2007, 02:20 PM
BenC
Populating Drop Down lists with Custom System variables
Hi all,

I was recent working on a prjoect with WebFocus 760 and ran into a problem. When I try to use a procedure to populate a Drop down list in the HTML page, but the procedure requires a custom system variable (I use the login name as a system variable), the drop down seems to be blank. However I have checked my procedure and it seems to run fine as a regular procedure on its own and not trying to populate the drop down. I was wondering if it had anything to do with the order in which the procedures and the variables are loaded, if so is there a solution for this?

Thanks in Advance,
Ben
September 24, 2007, 03:37 PM
cmallain
Could you send an example?


------------------------------------------
last version used: v7.1; truly miss the wonderful things I did with WebFOCUS, HTML, & JavaScript.
September 24, 2007, 04:49 PM
BenC
< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<TITLE>HtmlPage
</TITLE>
<script id=clientEventHandlersJS type=text/javascript>
function button1_OnClick(ctrl) {
// TODO: add validation code here
OnExecute(ctrl)
}
</SCRIPT>
</HEAD>
<BODY>
<iframe id=iframe1 style="Z-INDEX: 1; LEFT: 20px; WIDTH: 580px; POSITION: absolute; TOP: 150px; HEIGHT: 370px" tabIndex=1 name=iframe1 frameBorder=no scrolling=no>
</IFRAME>
<INPUT language=java_script id=button1 style="Z-INDEX: 2; LEFT: 320px; WIDTH: 90px; POSITION: absolute; TOP: 70px; HEIGHT: 20px" onclick=button1_OnClick[this) tabIndex=2 type=button value=View name=button1 requests_list="0">
<INPUT id=combobox1 style="LEFT: 150px; WIDTH: 128px; POSITION: absolute; TOP: 70px; HEIGHT: 22px" tabIndex=3 accept=0 size=0 name=ENDDATE sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" operation="NONE" addalloption="0" datafield="ADDRATE" displayfield="ADDRATE" elementtype="14" calendardata="0/0/-10;0/0/10" calendardatatype="1" ibiformat="MDYY" multiple="false">
<SELECT id=combobox2 style="Z-INDEX: 5; LEFT: 150px; WIDTH: 150px; POSITION: absolute; TOP: 40px" tabIndex=4 name=COMPANY sourcetype="typeFex" datafieldtype="VARCHAR" datatype="1" operation="NONE" addalloption="0" datafield="BILLINGCOMPANY" displayfield="BILLINGCOMPANY" datasource="OMEGA-BRKR_FILTER.fex" accept="0" ibiapp_app="Ben-test baseapp" ibic_server="EDASERVE">
</SELECT>
<SPAN id=text1 style="Z-INDEX: 6; LEFT: 40px; WIDTH: 50px; POSITION: absolute; TOP: 40px; HEIGHT: 20px" tabIndex=5>Broker:
</SPAN>
<FIELDSET id=groupbox1 style="Z-INDEX: -1; LEFT: 20px; WIDTH: 410px; POSITION: absolute; TOP: 30px; HEIGHT: 70px" tabIndex=6>
</FIELDSET>
<SPAN id=text2 style="Z-INDEX: 7; LEFT: 40px; WIDTH: 110px; POSITION: absolute; TOP: 70px; HEIGHT: 20px" tabIndex=7>Settlement Period
</SPAN>
<SPAN id=text3 style="Z-INDEX: 8; LEFT: 160px; WIDTH: 110px; POSITION: absolute; TOP: 10px; HEIGHT: 20px" tabIndex=8>
<STRONG>
<U>Broker Invoices
</U>
</STRONG>
</SPAN>
<xml id=ibi_requests>
<requests>

<request requestid="0" sourcetype="typeFex" targettype="0" targetname="iframe1" ibif_ex="OMEGA-SETTLEMENT.fex" ibic_server="EDASERVE" ibiapp_app="Ben-test baseapp">

<variables>

<variable field="" file="omega-rates.mas" desc="" datatype="0" operation="" name="ENDDATE" accept="0" type="default" select="0">

</variable>

<variable field="" file="omega-rates.mas" desc="" datatype="0" operation="" name="COMPANY" accept="0" type="default" select="0">

</variable>

</variables>

</request>
</requests>
</xml>
</BODY>
</HTML>

The code for the HTML is listed above. The combobox2 is calling the procedure:
OMEGA-BRKR_FILTER.fex which requires a custom system variable which was named: &MRUSER (which stores the LoginID from the dashboard login). But everytime I ran it, the dropdown list is blank. I tested the system variable, and it works without the drop down. But for some reason it won't populate the drop down.

The .fex to populate this is listed below:

-* File OMEGA-BRKR_FILTER.fex
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE//CLIENT
SET TRACEUSER = CLIENT
SET XRETRIEVAL = ON
SET EMPTYREPORT = ON

-SET &ECHO = OFF;

-*SET MRUSER = &MRUSER;

TABLE FILE BRAccessRights
PRINT
BROKERID
BROKERID
WHERE ( LOGIN EQ '&MRUSER' ) AND (ACTIVE EQ 'YES');
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END

Thanks for taking the time to look at this.

This message has been edited. Last edited by: BenC,
September 24, 2007, 05:03 PM
Francis Mariani
I haven't used Dev Studio to create drop-down lists, but I did notice that the fex is called as a self-service program from an APP folder and not from MRE, so it's possible that &MRUSER is not populated.


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
September 24, 2007, 05:16 PM
TexasStingray
BenC, when the layout page is loading up does it open a new browser window?




Scott

Yes, it opens a new small window stating that the query has failed.
This is supposed to be fixed in 7.6.4




Scott