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?
			
			
									
						
										
						Database Driven SelectBox order
- 
				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:
 
- 
				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
To try to help you, I created my own table named CHGCOD using the following SQL statements:
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:
When I view it, the options are displayed in the sorted order:
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?
			
			
									
						
										
						Code: Select all
create table SKTEST/CHGCOD (
 CHCD21 char(10)          
)
insert into chgcod values
('ZZZZZZ'),              
('BBBBBB'),              
('111111'),              
('999999'),              
('AAAAAA')               
- 
				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
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
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?
			
			
									
						
										
						Who is online
Users browsing this forum: Google [Bot] and 17 guests