Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.filemaker > #2117
| Path | csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Helpful Harry <HelpfulHarry@BusyWorking.com> |
| Newsgroups | comp.databases.filemaker |
| Subject | Re: How to Search for a Year in a Script |
| Date | Fri, 20 Mar 2015 19:18:37 +1200 |
| Organization | Aioe.org NNTP Server |
| Lines | 82 |
| Message-ID | <200320151918378956%HelpfulHarry@BusyWorking.com> (permalink) |
| References | <1m13hlr.134v3c4oahfczN%csampson@inetworld.net> <120320151830400933%HelpfulHarry@BusyWorking.com> <1m1hl39.1hp6kkr1njt975N%csampson@inetworld.net> |
| NNTP-Posting-Host | mbEEXtHFaBhCqTzLPcB7hA.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 8bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Thoth/1.8.4 (Carbon/OS X) |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| X-Face | vIZzK[X\z-._]-_:U?l@cBtwg<{a>ggn\mH}Vs>38E,#R%7h%U0'=4;1Q=erO %[T#a{YJfGvAbWmE@f_h]<rQ30+q;vqA^FUVx%\9{@r{gt${p^.L~bemFF@WY$r9fhuA F"1)$0+MgN+j8OO<SAec%$P;!M4Aj/kVitK5\xKmed-/3$2LiT1nI!-lKjt0B!qP_E{V ja+\#+[_uq8",IkoIF3M0}}qCD(& |
| Xref | csiph.com comp.databases.filemaker:2117 |
Show key headers only | View raw
In article <1m1hl39.1hp6kkr1njt975N%csampson@inetworld.net>, Charles H.
Sampson <csampson@inetworld.net> wrote:
> Helpful Harry <HelpfulHarry@BusyWorking.com> wrote:
>
> > In article <1m13hlr.134v3c4oahfczN%csampson@inetworld.net>, Charles H.
> > Sampson <csampson@inetworld.net> wrote:
> > >
> > > How do I execute a Find in a script to find records where a date field
> > > has a specified year? Executing the Find manually, I'd just enter the
> > > year in the date field (in Find mode), FileMaker would change that to
> > > */*/year, and off we'd go. In my script, the year is in a local
> > > variable, say $The Year. Constructs like Date ("*"; "*"; $The Year)
> > > don't work. What to do?
> >
> >
> > FileMaker is generally fairly forgiving about using the wrong data type
> > in a field, but the exception is when performing Finds with Date or
> > Time fields with the wildcard symbols ("*" or "@" or "!") in scripted
> > finds simply doesn't work (at least in older versions of FileMaker, not
> > sure about the newest versions).
> >
> > There's two methods to achieve what you want ...
> >
> > 1. Separate Year Field
> > You can create a separate field which only stores the
> > year as a number
> > i.e.
> > YearField = Year(DateField)
> > and perform the scripted Find on that using the Set Field
> > command
> > i.e.
> > Enter Find Mode []
> > Set Field [YearField, "2015"]
> > Perform Find []
> > ...
>
> Something happened that caused me to overlook this reply. I've now
> implemented a form of this, specifically
>
> Enter Find Mode []
> Set Field [Date; $Report Year]
> Perform Find []
> Enter Find Mode []
> Set Field [Date Paid, $Report Year]
> Extend Found Set []
>
> This appears to be working. (I haven't done the necessary exhaustive
> testing yet.) However, for some reason the script pauses at the Find and
> Extend steps, displaying a Find Mode window with an active Continue
> button. I haven't found a "Don't Pause" checkbox or anything similar
> yet.
>
> I haven't digested the rest of your post yet, Harry. I might have
> comments or questions on it when I do.
If that's really your Script and doesn't have a typo when transferred
to here, then it looks like there is a mistake in it.
I'm not sure what you're trying to achieve but there are two Enter Find
Mode commands and only one Perform Find, so that Script will finish
still in Find Mode.
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.
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.
Helpful Harry :o)
Back to comp.databases.filemaker | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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