Normal Topic @UserSelect Sublists (Read 1387 times)
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
@UserSelect Sublists
Apr 3rd, 2004 at 7:24pm
Print Post Print Post  
I noticed that if the string used in @userselect contains a forward slash ( / ), the list diplays with a sublist. I keep getting a sublist with just one selection in it.

I can't seem to find any information regarding this in the manuals. What is the correct syntax? Or maybe this isn't a supported feature?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @UserSelect Sublists
Reply #1 - Apr 3rd, 2004 at 8:01pm
Print Post Print Post  
Instead of using one slash "/" if you use double slash "//", it would not create submenu. I believe it has been reserved for making menu and submenu.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @UserSelect Sublists
Reply #2 - Apr 3rd, 2004 at 8:11pm
Print Post Print Post  
Carl,
This was discussed in the past in the following link

http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=archived;action=display...

  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @UserSelect Sublists
Reply #3 - Apr 4th, 2004 at 4:18am
Print Post Print Post  
Bharat,

Thanks for the input. I did read that thread, but I was looking for a way to get multiple selections on each submenu like this:
Color >
           Blue
           Green
           Red
Size >
           Small
           Medium
           Large

All I can seem to manage is to have something like this:
Color >  Blue >  Green >  Red
Size >  Small >  Medium >  Large

I am using "Color/Blue/Green/Red". Of course that keeps making a new submenu at each slash. If I use a semicolon ("Color/Blue;Green;Red"), it will place Blue on the Color submenu and Green & Red will be listed on the primary menu under Color like this:
Color>
          Blue
Green
Red

So, what character do I use to separate the submenu choices?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @UserSelect Sublists
Reply #4 - Apr 4th, 2004 at 8:35am
Print Post Print Post  
Carl,
I misunderstood you. In order to get the Submenu as you wanted, you need to use syntax something like this:

If Item = "" then
Item = @userselect ("Color/Red;Color/Yellow;Color/Green;Color/Blue;")

This gives the proper submenu such as

Color >  Red
            Yellow
            Green
            Blue
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @UserSelect Sublists
Reply #5 - Apr 4th, 2004 at 6:08pm
Print Post Print Post  
Bharat,

Excellent! Thank you. Grin

Where did you find information on this? I couldn't find anything in the manuals.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @UserSelect Sublists
Reply #6 - Apr 4th, 2004 at 8:20pm
Print Post Print Post  
It was just a lucky guess backed by trial and error. As indicated by Erika, Sesame Development  Team is planning to implement elaborate menu system in Sesame as time unfolds.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @UserSelect Sublists
Reply #7 - May 4th, 2004 at 11:15am
Print Post Print Post  
Lanticans,

I noticed that while using slashes in @UserSelect to create submenus, the list is not arranged alphabetically. Remove the slashes, and things do alphabetize.

That seems like a bug, but I'm guessing it may be intentional to give more control over how the information is presented. Would I be correct?

If I am correct, the only problem with it functioning this way is that when using @XListValues to supply the list of selections, and I DO want it listed alphabetically, I need to export and import the data in the external database to sort it. In other words, if I make an addition to the external database, that new entry is not placed where I want it until I export the data, delete all the records, and import that same data back in.

Is there a way to use submenus AND still have it sort alphabetically?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @UserSelect Sublists
Reply #8 - May 5th, 2004 at 12:04pm
Print Post Print Post  
The slashes will prevent a sort. Otherwise, submenus cannot function correctly. If you want both submenus and sorted values, you have to sort the values yourself. If your data has slashes, and you don't want submenus, you need to strip out or double the slashes.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @UserSelect Sublists
Reply #9 - May 6th, 2004 at 12:55am
Print Post Print Post  
Erika,

Thanks for the reply.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged