Help: scripted sort with a date range

  • Follow


I'd be grateful for some help.

I'm trying to script a search for a date range, for example "> today"

The problem is, that to do this you obviously have to put the search 
string into a date field, and the presence of the ">" character means 
that it's not interpreted as a date, so FM squeals

Any ideas please?

thanks

0
Reply Luke 6/15/2004 10:27:59 AM

Luke Siemaszko <no.spam.for.me@please.com> wrote:

> I'd be grateful for some help.
> 
> I'm trying to script a search for a date range, for example "> today"
> 
> The problem is, that to do this you obviously have to put the search 
> string into a date field, and the presence of the ">" character means
> that it's not interpreted as a date, so FM squeals
> 
> Any ideas please?
> 
> thanks

Your field "DateField" should be on the layout "LayoutName"
Script steps:

Go to Layout ["LayoutName"]
Enter Find Mode []
Insert Calculated Result [Select, "DateField", "">" &
Status(CurrentDate)"]
Perform Find []
Go to Layout [original layout]

-- 
Henk B
0
Reply henk 6/15/2004 10:50:41 AM


"Henk B" <henk.invalid@address.invalid> wrote in message
news:1gff9wm.1qbldimxht71kN%henk.invalid@address.invalid...
> Luke Siemaszko <no.spam.for.me@please.com> wrote:
>
> > I'd be grateful for some help.
> >
> > I'm trying to script a search for a date range, for example "> today"
> >
> > The problem is, that to do this you obviously have to put the search
> > string into a date field, and the presence of the ">" character means
> > that it's not interpreted as a date, so FM squeals
> >
> > Any ideas please?
> >
> > thanks
>
> Your field "DateField" should be on the layout "LayoutName"
> Script steps:
>
> Go to Layout ["LayoutName"]
> Enter Find Mode []
> Insert Calculated Result [Select, "DateField", "">" &
> Status(CurrentDate)"]
> Perform Find []
> Go to Layout [original layout]
>
> --
> Henk B

Actually, you need to use DateToText( Status( CurrentDate)).


0
Reply Glenn 6/15/2004 2:17:00 PM

Luke

If you are using FMPro 7, I don't believe that the answers/suggestions
given so far will work. I may be wrong, but I believe that you will
need to create a self-join relationship to implement the sort/find.
Here is a link that describes the process:
http://www.filemaker.com/ti/109090.html

Mike


On Tue, 15 Jun 2004 11:27:59 +0100, Luke Siemaszko
<no.spam.for.me@please.com> wrote:

>I'd be grateful for some help.
>
>I'm trying to script a search for a date range, for example "> today"
>
>The problem is, that to do this you obviously have to put the search 
>string into a date field, and the presence of the ">" character means 
>that it's not interpreted as a date, so FM squeals
>
>Any ideas please?
>
>thanks

0
Reply blag 6/15/2004 5:27:36 PM

No relationship necessary.  You can script the find using Insert 
Calculated Result (as someone else described).

blag wrote:
> Luke
> 
> If you are using FMPro 7, I don't believe that the answers/suggestions
> given so far will work. I may be wrong, but I believe that you will
> need to create a self-join relationship to implement the sort/find.
> Here is a link that describes the process:
> http://www.filemaker.com/ti/109090.html
> 
> Mike
> 
> 
> On Tue, 15 Jun 2004 11:27:59 +0100, Luke Siemaszko
> <no.spam.for.me@please.com> wrote:
> 
> 
>>I'd be grateful for some help.
>>
>>I'm trying to script a search for a date range, for example "> today"
>>
>>The problem is, that to do this you obviously have to put the search 
>>string into a date field, and the presence of the ">" character means 
>>that it's not interpreted as a date, so FM squeals
>>
>>Any ideas please?
>>
>>thanks
> 
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg              (818) 883-2846
FM Pro Solutions       Los Angeles, California
Associate Member, FileMaker Solutions Alliance
0
Reply Howard 6/15/2004 5:48:50 PM


Glenn Schwandt wrote:

> "Henk B" <henk.invalid@address.invalid> wrote in message
> news:1gff9wm.1qbldimxht71kN%henk.invalid@address.invalid...
> 
>>Luke Siemaszko <no.spam.for.me@please.com> wrote:
>>
>>
>>>I'd be grateful for some help.
>>>
>>>I'm trying to script a search for a date range, for example "> today"
>>>
>>>The problem is, that to do this you obviously have to put the search
>>>string into a date field, and the presence of the ">" character means
>>>that it's not interpreted as a date, so FM squeals
>>>
>>>Any ideas please?
>>>
>>>thanks
>>>
>>Your field "DateField" should be on the layout "LayoutName"
>>Script steps:
>>
>>Go to Layout ["LayoutName"]
>>Enter Find Mode []
>>Insert Calculated Result [Select, "DateField", "">" &
>>Status(CurrentDate)"]
>>Perform Find []
>>Go to Layout [original layout]
>>
>>--
>>Henk B
>>
> 
> Actually, you need to use DateToText( Status( CurrentDate)).
>


I thought I'd done that and found it didn't work - problem as described 
in my original post.
Maybe I did something wrong - I'll try it again!


thanks



0
Reply Luke 6/16/2004 4:18:49 PM

Howard Schlossberg <howard@antispahm.fmprosolutions.com> wrote in message news:<10cudk51117ru8b@corp.supernews.com>...
> No relationship necessary.  You can script the find using Insert 
> Calculated Result (as someone else described).
> 
> blag wrote:
> > Luke
> > 
> > If you are using FMPro 7, I don't believe that the answers/suggestions
> > given so far will work. I may be wrong, but I believe that you will
> > need to create a self-join relationship to implement the sort/find.
> > Here is a link that describes the process:
> > http://www.filemaker.com/ti/109090.html
> > 
> > Mike
> > 
> > 
> > On Tue, 15 Jun 2004 11:27:59 +0100, Luke Siemaszko
> > <no.spam.for.me@please.com> wrote:
> > 
> > 
> >>I'd be grateful for some help.
> >>
> >>I'm trying to script a search for a date range, for example "> today"
> >>
> >>The problem is, that to do this you obviously have to put the search 
> >>string into a date field, and the presence of the ">" character means 
> >>that it's not interpreted as a date, so FM squeals
> >>
> >>Any ideas please?
> >>
> >>thanks
> > 
> >
You need three fields: transactiondate(date), startdate(date,global),
and enddate(date, global). Then you write a find script with these
steps:
SelectAll
Enter Find Mode
InsertCalculateResult[(transactiondate,getasdate(startdate)&"..."getasdate(enddate)]
Performfind [replacefoundset]
0
Reply g 6/16/2004 10:26:08 PM

6 Replies
223 Views

(page loaded in 0.133 seconds)

Similiar Articles:













7/24/2012 6:06:43 AM


Reply: