Normal Topic Subform date sort question. (Read 457 times)
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Subform date sort question.
Sep 6th, 2007 at 12:50am
Print Post Print Post  
Hi all, once again thanks for the help.


I have a sub form that has dates on it, I want to be able to only show the last 6  months of records in the sub form window, I and looking at possibly using the date received LE and retrieve everything from todays date to six months.


Any point in the right direction will help thanks.
  
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Subform date sort question.
Reply #1 - Sep 6th, 2007 at 1:48am
Print Post Print Post  
I know that I have done something similar in the past but I can't recall how, right now . 
I will have to dig through some old applications to see if I can locate the code.

I think it had to do with ResultSets or FormResultSets that match user defined criteria.

But, in the meantime, how about this as a concept?
Set the default sort for the sub form to be by the date, descending order.
Loop through each of the records, looking at the date element.
As long as each record date is newer than 6 months ago, keep the record.
As soon as the first record comes up with date over 6 months old, stop the loop.
Now make the first group of records Visibla and all the others Invisible.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Re: Subform date sort question.
Reply #2 - Sep 6th, 2007 at 1:56am
Print Post Print Post  
(Hummm, I think from here on in i will place my sesame version)

Hi Bob,

Is that a Sesame v2.0 as I am running 1.15A
  
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Subform date sort question.
Reply #3 - Sep 6th, 2007 at 2:30am
Print Post Print Post  
Version 1x has a group of ResultSet commands, including RemoveResultSet.  I don't have access to Sesame or documentation right now.  But you may be able to use that to remove records over 6 months old from the normal result set.  Check the User Manual and Programming Guide.

Version 2x has a stronger group of commands plus XResultSet commands including the powerful XResultSetSearch.

But the solution that I used in the past was using Version 1x, I believe.  Someone else will probably provide a solution for you before I locate mine.  But I will try to find it for you, appreciate your patience.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged