Normal Topic Sort a Result Set (Read 545 times)
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
Sort a Result Set
Nov 8th, 2005 at 9:35pm
Print Post Print Post  
I would like to have a Command Button for sorting a result set following a retrieve. I have created the element for the Command Button and programmed it using saved sort specs - see below.

Var vSort as String
var vSort1 as String
var vNav as Int

// Offer User Choice of Sort. Popup is placed directly over Sort button

     PopupSelectPosition(4, @XPos(cmd_Sort), @YPos(cmd_Sort))
     vSort = @PopupMenu(" ;Title;Author;Publisher","Which Way Do You Want to Sort?")

// Create the SelectTreeItem statement
     
     vSort1 = "Search Update Menu!Results Commands!Sort!BookIndx!" + vSort + " (Preview)"

//Run the SelectTreeItem Command

           vNav = @SelectTreeItem(vSort1)

It doesn't work.

Any ideas?
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged
 
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
Re: Sort a Result Set
Reply #1 - Nov 8th, 2005 at 9:37pm
Print Post Print Post  
Test
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Sort a Result Set
Reply #2 - Nov 8th, 2005 at 9:50pm
Print Post Print Post  
Hello Paul,

Try something like

Code
Select All
 Var vSort as String
var vNav as Int

// Offer User Choice of Sort. Popup is placed directly over Sort button

 PopupSelectPosition(4, @XPos(cmd_Sort), @YPos(cmd_Sort))
 vSort = @PopupMenu("Title;Author;Publisher","Which Way Do You Want to Sort?")

vNav = @LoadSortSpec(vsort)
vNav = @SelectTreeItem("Search Update Menu!Results Commands!Sort") 



This assumes that you have Sort specs named "Title", "Author", and "Publisher".

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
Re: Sort a Result Set
Reply #3 - Nov 8th, 2005 at 10:05pm
Print Post Print Post  
Ray,

Exactly - works great

Thanks!
Grin
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged