I have a list of a few hundred customers in a list box. Is there any way to put these customers in alphabetical order in a listbox?
Thanks!
Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
September 11, 2007, 11:37 AM
Darin Lee
Yes. I'm sure there's some javascript to do it, (i'm not a javascript person) but you can always run a procedure that sorts them alphabetically before holding them for your list box control. Lots of examples available in the forum
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
September 17, 2007, 03:04 PM
cburtt
You don't indicate the source of the customer list you want to show in the listbox. I'm presuming you have a file/table somewhere that contains that.
Consider running a TABLE FILE ... against your Customer Master file to select the customers you need and hold that selection in a *.htm file. Precede the query with a FILEDEF pointing to a place in your FOCUS path. Include BY {customer-name-field} to sort them as you wish and an ON TABLE HOLD AS {filedef-name} to write the *.htm in the appointed place. Each row in the file must have the customer-name text you want preceded with an html 'select' tag consisting of the LT character, the word 'SELECT' and the GT character.
In your HTML/launch page, reference the content of the select box with !{name-of-held-file} which will cause the select box to be populated from the output of the afore mentioned query.
For this to work the launch page must be displayed by WF using a *.fex containing HTMLPAGE {name-of-launch-page-containing '!...'}.
If you need details, I can post example fex.
WIN/2K running WF 7.6.4 Development via DevStudio 7.6.4, MRE, TextEditor. Data is Oracle, MS-SQL.
September 17, 2007, 03:17 PM
vaayu
I agree with cburtt, I have some launch forms where I use the dynamic list boxes using a procedure (.fex) and create a TABLE FILE for that list CREATE A FEX CALLED "CUSTOMERLIST.FEX" DEFINE FILE TABLE1 CUST/A120=CUSTOMERNAME|' : '| CUSTOMERID; END TABLE FILE TABLE1 SUM CUST AS 'CUSTLIST' BY CUSTOMERID ON TABLE PCHOLD FORMAT XML END