I have a fairly simple launch page that has two dynamic list boxes on it. Currently, they pull back all the data in the specified column. How do I restrict what they pull back (ie - only where active = 1) and how do I order the data in the boxes? This is the launch page code: <TITLE>Count of Jobs Done</TITLE> <META content="WebFocus Report Layout Painter" name ="Generator"> <SCRIPT id=IbiOptionsScript type=text/javascript> var cgipath = "cgipath"; var ibirls = "ibirls"; var multidrill = "multidrill"; var mntFormValidate = "mntFormValidate"; var dyncalendar = "dyncalendar"; var ibiOptions = new Array(cgipath, ibirls,mntFormValidate,multidrill); <SCRIPT id=nls src="/ibi_html/javaassist/nls.js" type=text/javascript> <SCRIPT id=ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript> <SCRIPT id=ibigblloadCss type=text/javascript> ibigblloadCss(null); <BODY onload=OnLoad() nextelementnum="15" drawgrid="1" snaptogrid="1" gridsizeCX="10" gridsizeCY="10" pagesizeCX="2000" pagesizeCY="2000"> < !--startibiitems--> <FORM onsubmit=SaveValues() method=post name ="form"> <INPUT type=hidden value=countofjobsdone name ="IBIF_ex"> <INPUT id=IBIAPP_app type=hidden value=docfinity name ="IBIAPP_app"> <SPAN id=ITEM1 style="Z-INDEX: 6; LEFT: 10px; WIDTH: 80px; POSITION: absolute; TOP:70px; HEIGHT: 20px" name ="lblUser" elementname="lblUser" elementtype="text"> <SPAN FragmentColor="0" sourcetype="typeUrl" targettype="1" FragmentStartChar="0" FragmentEndChar="7">User ID</SPAN> <SELECT id=ITEM2 style="Z-INDEX: 7; LEFT: 10px; WIDTH: 150px; POSITION: absolute; TOP: 100px; HEIGHT: 100px" multiple size=2 name ="UserID" elementname="lstUser" elementtype="listbox" sourcetype="typeMaster" labelid="ITEM1" caption="listbox" operation=" {AND|OR}" ibiformat datatype="1" addalloption="1" dynalldisplayvalue="ALL ="-1" chainnumber="-1" cacheruntimedata="0" displayfield="USER_LOGIN_ID" numofrecords="-1" datafield="USERID" datasource="SEC_USERS.mas" datafieldtype="CHAR"></SELECT> <SPAN id=ITEM3 style="Z-INDEX: 8; LEFT: 170px; WIDTH: 70px; POSITION: absolute; TOP: 70px; HEIGHT: 20px" name ="lblGroup" elementname="lblGroup" elementtype="text"><SPAN FragmentColor="0" sourcetype="typeUrl" targettype="0" FragmentStartChar="0" FragmentEndChar="5">Group <SELECT id=ITEM4 style="Z-INDEX: 9; LEFT: 170px; WIDTH: 150px; POSITION: absolute; TOP: 100px; HEIGHT: 100px" multiple size=2 name ="Group" elementname="lstGrp" elementtype="listbox" s ourcetype="typeMaster" labelid="ITEM3" caption="listbox" operation=" {AND|OR}" ibiformat datatype="1" addalloption="1" dynalldisplayvalue="ALL" inchainindex="-1" chainnumber="-1" cacheruntimedata="0" displayfield="GROUP_NAME" numofrecords="-1" datafield="GROUPID" datasource="SEC_GROUP.mas" datafieldtype="CHAR"> <INPUT id=ITEM5 style="Z-INDEX: 10; LEFT: 10px; WIDTH: 80px; POSITION: absolute; TOP: 210px; HEIGHT: 30px" type=submit value=Submit name ="btnSubmit" elementname="btnSubmit" elementtype="button" sourcetype="typeUrl" targettype="0" targetname onclickset="0"> <INPUT id=ITEM6 style="Z-INDEX: 11; LEFT: 110px; WIDTH: 80px; POSITION: absolute; TOP: 210px; HEIGHT: 30px" type=reset value=Reset name ="btnReset" elementname="btnReset" elementtype="button" sourcetype="typeUrl" targettype="0" targetname onclickset="0"><SPAN id=ITEM11 style="Z-INDEX: 30; LEFT: 10px; WIDTH: 60px; POSITION: absolute; TOP: 30px; HEIGHT: 20px" name ="text11" elementname="text11" elementtype="text"> <SPAN FragmentColor="0" sourcetype="typeUrl" targettype="0" FragmentStartChar="0" FragmentEndChar="7"> Between <SPAN id=ITEM12 style="Z-INDEX: 31; LEFT: 220px; WIDTH: 30px; POSITION: absolute; TOP: 30px; HEIGHT: 20px" name ="text12" elementname="text12" elementtype="text"> <SPAN FragmentColor="0" sourcetype="typeUrl" targettype="0" FragmentStartChar="0" FragmentEndChar="3">and <INPUT id=ITEM13 style="Z-INDEX: 37; LEFT: 70px; WIDTH: 150px; POSITION: absolute; TOP: 30px; HEIGHT: 22px" name ="BDate" elementname="txtBDate" elementtype="edit" labelid caption="edit" operation="NONE" ibiformat> <INPUT id=ITEM14 style="Z-INDEX: 38; LEFT: 250px; WIDTH: 150px; POSITION: absolute; TOP: 30px; HEIGHT: 22px" name ="EDate" elementname="txtEdate" elementtype="edit" labelid caption="edit" operation="NONE" ibiformat>!--endibiitems--> <SCRIPT id=OnloadHandler> function OnLoad() < !--startibilines--> UpdateData(); < !--endibilines-->} </BODY>[/code]Thanks for any help! -StephanieThis message has been edited. Last edited by: <Mabel>,
July 20, 2005, 12:35 PM
Tony A
Hi Stephanie, You could a lways control the SELECT instance yourself of course by performing a TABLE request in your launching fex. Something along the lines of DEFINE FILE SEC_ GROUPOPTIONS/A100='<option value='|GROUPID||'>' |GROUPID||'< /option>'; TABLE FILE SEC_GROUP SUM O PTIONS BY GROUPID NOPRINT WHERE ACTIVE EQ 1; ON TABLE SET HOLDLIST PRINTONLY ON TABLE HOLD AS SELECT1 FORMAT ALPHA END -RUN and then in your HTML you would add
Please note that I haven't tested this (I don't have your master and data etc.) but I have proved it against the CAR file of course Good luckThis message has been edited. Last edited by: <Mabel>,
July 21, 2005, 09:11 AM
Tony A
One other alternative is, of course, to create a view (depending upon your datasource) that covers your selection requirements, and then use that as the "datasource" attribute in the SELECT tag within your launch page.
August 22, 2005, 02:40 PM
silver179
Took a while to get back to this as other bugs took priority. I tried this, but consistently receive this error:
(FOC1400) SQLCODE IS
245
(HEX: 000000F5) XOPEN: 22018
Microsoft OLE DB Provider
for SQL Server: [22018] Syntax error
convertin: g the varchar
value '<option value=' to a column of data type int. L (
FOC1406) SQL
OPEN CURSOR ERROR. :
SEC_USERS
I've tried retyping, restructuring and still it tells me no. Any ideas would be much appreciated. -StephanieThis message has been edited. Last edited by: <Mabel>,
August 22, 2005, 03:07 PM
Tony A
I take it that you get this when you choose an option from the combo box?
Is your 'datafieldtype' set to CHAR and it should be INTEGER?
August 22, 2005, 03:10 PM
silver179
No, it happens on the page load. I get no data back and upon checking the source code I see the error.
I checked and the datafieldtype is set to CHAR.
-Stephanie
August 23, 2005, 11:01 PM
TexasStingray
Silver179, Don't know what version you are using but in 5.3 and newer you can populate the list box from a procedure (WebFOCUS procedure). in there you can add what ever if/where statements you want.
August 24, 2005, 07:23 AM
Tony A
Stephanie,
Where are you creating the list of options? Because the error message seems to say that MS SQL is having a problem putting the '<option value=' into an integer column.
If you would like me to look at your code the you can PM me.
September 29, 2006, 10:28 AM
Leah
quote:
Originally posted by TexasStingray: Silver179, Don't know what version you are using but in 5.3 and newer you can populate the list box from a procedure (WebFOCUS procedure). in there you can add what ever if/where statements you want.
I was searching for listbox population. I currently have a procedure to populate the list box, but it doesn't put in all occurances and when it does accept the field as a parameter ( a whole other issue ) the returned data is for an occurance of the selection for just previous to the one selected and the 'just previous' is not on the list because of the error in loading the list box. This is occurring using dev studio 7.1.4 against either 7.1.2 or 7.1.5