www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Unsort Records using Script
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
val
Posted
Hi

I would like to know how to use the SortFlagNOSORT property of the SortDescriptor Object since I have not found any sample code but the help file has insured me that it is possible to ignore a sort on a report using the SortFlagNOSORT property , even if a sort is assigned to a report.

val
 
Posts: 45 | Location: South Africa | Registered: Tue June 19 2001Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
I think you misinterpreted the help, or I'm misinterpreting what you're asking. All SortFlagNOSORT does is set the sort order to use "Unsorted Order" (as on the Sort Report dialog). It does not override any Compulsory Sort specified for a form.
 
Posts: 1895 | Location: Woburn, MA, USA | Registered: Thu July 13 2000Reply With QuoteEdit or Delete MessageReport This Post
val
Posted Hide Post
Hi Lisa

I previously phrased the question wrong because I do not have a compulsory sort on my report but a sort done thru code from a button. What I'd like to do now is unsort it
by putting the code on another button which I have already done however the unsort does not seem to work.

This is the code I am using :
var crs = Application.activeTextbase.currentRecordset;
var sd = crs.newSortDescriptor();
//the ffg displays the value 8
Application.message(sd.SortFlagNOSORT);
//I then try and set the SortFlagNOSORT true sd.SortFlagNOSORT = true;
//the ffg displays the value 8
Application.message(sd.SortFlagNOSORT);
Command.refreshWindow();

If anyone could please enlighten me on this matter , I'd really appreciate it.

Thank You
 
Posts: 45 | Location: South Africa | Registered: Tue June 19 2001Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
I believe following is the proper way to use SortFlagNOSORT. However, currently, it causes the software to exit. I'm awaiting feedback from the programmers.

function nosort_onClick()
{
var crs = Application.activeTextbase.currentRecordset;
var sd = crs.newSortDescriptor();
sd.sortFlags = sd.SortFlagNOSORT;
crs.Sort(sd);
Command.refreshWindow();
}
 
Posts: 1895 | Location: Woburn, MA, USA | Registered: Thu July 13 2000Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

www.Inmagic.com    Inmagic Forums    Inmagic Forums  Hop To Forum Categories  Scripting    Unsort Records using Script