Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #2817

Re: Finding in a Script Using Dates with Wildcards

From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: Finding in a Script Using Dates with Wildcards
Date 2017-04-11 13:51 +1200
Organization Aioe.org NNTP Server
Message-ID <110420171351137299%HelpfulHarry@BusyWorking.com> (permalink)
References <1n3z5a7.12we6wpxhv9ghN%csampson@inetworld.net> <1n49pv5.1m4u9y3yod6u3N%csampson@inetworld.net> <ocgv08$e79$2@news.motzarella.org>

Show all headers | View raw


In article <ocgv08$e79$2@news.motzarella.org>, Howard Schlossberg
<howard@nospam.fmprosolutions.com> wrote:
> On 4/10/2017 1:57 PM, Charles H. Sampson wrote:
> > 
> >    Go to Layout ("xyz")
> >    Enter Find Mode []
> >    Set Field [xyz::Date; Date (DISummaryMonth, "*", $SummaryYear)]
> >    Perform Find []
> >
> > The result is the error message "No records match this set of find
> > requests."
> 
> You are trying to make a date of something with an invalid day.  Instead 
> of trying to insert something you're converting to a date, just insert 
> the text... as in:
> 
> DISummaryMonth & "/*/" & $SummaryYear

Maybe things have improved in the newer versions of FileMaker, but in
the older ones I've always found that it complains if you try to simply
insert text values into scripted Find Requests. Even in manual Find
Requests it doesn't like the wildcards "*" or "?".

Instead you have to use a function to convert it to a date format, then
back to text, and use the Range operator "...".

In fact the older versions of FileMaker don't even like using Set Field
in such situations and instead you have to use the Insert Calculated
Result function. (This is in FileMaker 5.5 and older, I haven't yet
tried in the "newer" FileMaker 7 I recently got.)
e.g. something along the lines of

    Insert Calculated Result [xyz::Date; 
            DateToText(Date(Date(DISummaryMonth, 1, $SummaryYear)) 
            & "..." &
            DateToText(Date(DISummaryMonth + 1, 1, $SummaryYear) - 1))]

Yes, it's weird and over-complicated, but it's the only way it actually
works without error messages.

Helpful Harry  :o)

Back to comp.databases.filemaker | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Finding in a Script Using Dates with Wildcards csampson@inetworld.net (Charles H. Sampson) - 2017-04-04 20:51 -0700
  Re: Finding in a Script Using Dates with Wildcards Martin Τrautmann <t-usenet@gmx.net> - 2017-04-05 04:59 +0000
    Re: Finding in a Script Using Dates with Wildcards Helpful Harry <HelpfulHarry@BusyWorking.com> - 2017-04-05 18:51 +1200
  Re: Finding in a Script Using Dates with Wildcards Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2017-04-05 11:08 -0700
  Re: Finding in a Script Using Dates with Wildcards csampson@inetworld.net (Charles H. Sampson) - 2017-04-10 13:57 -0700
    Re: Finding in a Script Using Dates with Wildcards ursus <ursus.kirk@gmail.com> - 2017-04-10 23:41 +0200
    Re: Finding in a Script Using Dates with Wildcards Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2017-04-10 14:58 -0700
      Re: Finding in a Script Using Dates with Wildcards Helpful Harry <HelpfulHarry@BusyWorking.com> - 2017-04-11 13:51 +1200
        Re: Finding in a Script Using Dates with Wildcards Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2017-04-10 19:40 -0700

csiph-web