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


Groups > comp.databases.filemaker > #2124

Re: How to Search for a Year in a Script

From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: How to Search for a Year in a Script
Date 2015-03-23 09:03 +1200
Organization Aioe.org NNTP Server
Message-ID <230320150903182721%HelpfulHarry@BusyWorking.com> (permalink)
References <1m13hlr.134v3c4oahfczN%csampson@inetworld.net> <120320151830400933%HelpfulHarry@BusyWorking.com> <1m1hl39.1hp6kkr1njt975N%csampson@inetworld.net> <200320151918378956%HelpfulHarry@BusyWorking.com> <1m1ntek.tz2lk8pf0e7aN%csampson@inetworld.net>

Show all headers | View raw


In article <1m1ntek.tz2lk8pf0e7aN%csampson@inetworld.net>, Charles H.
Sampson <csampson@inetworld.net> wrote:

> Helpful Harry <HelpfulHarry@BusyWorking.com> wrote:
> 
<snip>
> > 
> > If you are trying to find any records with Date = $Report Year or any
> > records with Date Paid = $Report Year, then the Script should be
> > something like this:
> > 
> >     Enter Find Mode []
> >     Set Field [Date; $Report Year]
> >     New Record / Request
> >     Set Field [Date Paid; $Report Year]
> >     Perform Find []
> > 
> > As with manual Finds, the New Request creates an "OR" find (i.e. find
> > records matching request criteria 1 OR records matching request
> > criteria 2.
> 
> That's a good thing to know. I don't think the Pogue book tells me that
> and I don't really want to search it because its index is so poor, but I
> had assumed that when you specify a find with values for two fields, you
> got an "AND" find. Because of unclear result with my probe testing, I
> just decided to do things step-by-step.

Separate requests = OR find 
(i.e. find records matching field in Request1 OR field in Request2)

One request = AND find 
(i.e. find records matching field1 AND field2 in the request)

The Omit checkbox = NOT find
(i.e. find record NOT matching field1)


You can of course mix these in various ways.


I didn't know which your Script was trying to do (I guessed that Extend
was to add more records). 

If you are trying to find records where Date = Report Year (and Date
Paid can be anything) OR records where Date Paid = Report Year (and
Date can be anything), then you need the Script above using the New
Record / Request command.

If you are trying to find records where both Date = Report Year AND
Date Paid = Report Year, then you can do that within one Find Request,
e.g.

     Enter Find Mode []
     Set Field [Date; $Report Year]
     Set Field [Date Paid; $Report Year]
     Perform Find []


As Howard (I think it was) said, there may well be good reasons to use
Extend or Restrain, but unless you've got a massive number of records
and / or a very slow computer / external storage / network, there's
really little point in using them and making things more complicated
than they need to be.




> > By the way, it's probably not a good idea to have a Field named "Date"
> > - it could be easily confused with the Date function.
> 
> It probably depends on your background. Mine is one in which so-called
> overloading is available and acceptable. (Overloading refers to the
> ability to have two different meanings for a name simultaneously.
> Deciding which one is in use at a particular time is called
> disambiguation.) I don't have any real problem with it but it can get
> confusing if you're not careful.

Some names aren't allowed to be used for fields, but applications
usually warn or stop you using them. For example, my old version Adobe
InDesign will happily let me define colours called "Red", "Blue",
"Green", but for some reason won't allow "Yellow".

In the old days of real programming you couldn't use data variable
names that were command or function names, so I always tend to make my
field names unique (i.e. InvoiceDate rather than just Date).

Helpful Harry  :o)

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


Thread

How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-11 01:10 -0700
  Re: How to Search for a Year in a Script Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2015-03-11 02:22 -0700
    Re: How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-11 12:00 -0700
      Re: How to Search for a Year in a Script clkaufmann@gmx.ch (Christoph Kaufmann) - 2015-03-11 20:39 +0100
      Re: How to Search for a Year in a Script Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2015-03-12 20:55 -0700
  Re: How to Search for a Year in a Script Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-03-12 18:30 +1300
    Re: How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-19 22:59 -0700
      Re: How to Search for a Year in a Script Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-03-20 19:18 +1200
        Re: How to Search for a Year in a Script Howard Schlossberg <howard@nospam.fmprosolutions.com> - 2015-03-20 21:27 -0700
        Re: How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-22 00:40 -0700
          Re: How to Search for a Year in a Script Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-03-23 09:03 +1200
            Re: How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-24 01:21 -0700
              Re: How to Search for a Year in a Script ursus <ursus.kirk@gmail.com> - 2015-03-24 09:45 +0100
                Re: How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-24 09:54 -0700
      Re: How to Search for a Year in a Script csampson@inetworld.net (Charles H. Sampson) - 2015-03-19 23:51 -0700
  Re: How to Search for a Year in a Script wonfuji@gmail.com - 2015-03-12 06:54 -0700
    Re: How to Search for a Year in a Script Ursus <ursus.kirk@ziggo.nl> - 2015-03-12 17:27 +0100

csiph-web