Database Driven SelectBox order

Use this board to ask questions or have discussions with other Genie users.
Post Reply
Wayne C.
Experienced User
Posts: 139
Joined: Mon Aug 16, 2010 12:04 pm
First Name: Wayne
Last Name: Colasinski
Company Name: Sofworx / Tantara Transport
Contact:

Database Driven SelectBox order

Post by Wayne C. »

This seems like a no-brainer, but I can't figure it out. Cannot get the choices for a dropdown list to come out in sorted (alphabetical) order.

choices database file: CHGCOD
choices options field: CHCD21
choices values field: CHCD21

order by: CHCD21

The choices seem to be displayed in random order. Am I missing something?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Database Driven SelectBox order

Post by Scott Klement »

To try to help you, I created my own table named CHGCOD using the following SQL statements:

Code: Select all

create table SKTEST/CHGCOD (
 CHCD21 char(10)          
)

insert into chgcod values
('ZZZZZZ'),              
('BBBBBB'),              
('111111'),              
('999999'),              
('AAAAAA')               
As you can see, the values aren't sorted in any particular order, and I did not specify any order on the table itself. Then, in Genie I added a dropdown like yours:
dropdown_properties.png
dropdown_properties.png (52.1 KiB) Viewed 1541 times
When I view it, the options are displayed in the sorted order:
dropdown_result.png
dropdown_result.png (9.01 KiB) Viewed 1541 times
I'm not sure how to help further, since I can't seem to recreate the problem. Can you tell me what I did differently?
Wayne C.
Experienced User
Posts: 139
Joined: Mon Aug 16, 2010 12:04 pm
First Name: Wayne
Last Name: Colasinski
Company Name: Sofworx / Tantara Transport
Contact:

Re: Database Driven SelectBox order

Post by Wayne C. »

Thanks Scott for your response.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Database Driven SelectBox order

Post by Scott Klement »

Wayne... is the problem solved? I'm not sure where this stands, since I didn't seem to have the same problem you did. Do you still need help, here?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest