Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.filemaker > #2161
| From | Helpful Harry <HelpfulHarry@BusyWorking.com> |
|---|---|
| Newsgroups | comp.databases.filemaker |
| Subject | Re: No Matching Records in a Script Find |
| Date | 2015-04-14 19:28 +1200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <140420151928086579%HelpfulHarry@BusyWorking.com> (permalink) |
| References | <1m2sjtb.7ukigzgagojdN%csampson@inetworld.net> <2b8f9$552b98cc$52d9780b$30967@news.ziggo.nl> <140420151351494073%HelpfulHarry@BusyWorking.com> <1m2uzcu.1eb5o0s1taqppoN%clkaufmann@gmx.ch> |
In article <1m2uzcu.1eb5o0s1taqppoN%clkaufmann@gmx.ch>, Christoph
Kaufmann <clkaufmann@gmx.ch> wrote:
> Helpful Harry <HelpfulHarry@BusyWorking.com> wrote:
>
> [Filemaker 5.5 or anything up to 7]
> > For example, a Find script might be something like:
> >
> > Set Error Capture [On]
> > Perform Find []
> > Set [gErrorCode; Get(LastError)]
A script like that will also work in older versions of FileMaker, but
you need to replace the Get(LastError) function with the
Status(CurrentError) function.
> Filemaker introduced script variables in version 8, meaning you don't
> need to bother with a global field. The step would be
>
> SetVariable ( $SearchError ; Get ( LastError ) )
>
> Variables are like global fast, but you don't have to set them up as
> fields, and they're faster. You still need global fields
>
> a) if you want the user to enter something
> b) if you need the value on the left side of relation
Yep, I did say you could use a Variable instead. There may also be
occasions when you want to use a normal Field instead.
> When evaluating a scripted find, you may also use Get ( FoundCount )
> rather than checking for error 401.
True if you're only worried about not finding any records, and that's
usually the way I do it. You still need the Set Error Capture [On]
command to stop FileMaker displaying its normal error window.
i.e.
Enter Find Mode []
Set Field [MyField; "Find Me"]
Set Error Capture [On]
Perform Find []
If [Get(FoundCount) <> 0]
{perform whatever script commands are to be done
with the found records}
Else
Show Custom Dialog ["There are no records with the
text 'Find Me'"; "OK"]
End If
Helpful Harry :o)
Back to comp.databases.filemaker | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
No Matching Records in a Script Find csampson@inetworld.net (Charles H. Sampson) - 2015-04-13 00:33 -0700
Re: No Matching Records in a Script Find Ursus <ursus.kirk@ziggo.nl> - 2015-04-13 12:21 +0200
Re: No Matching Records in a Script Find Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-04-14 13:51 +1200
Re: No Matching Records in a Script Find clkaufmann@gmx.ch (Christoph Kaufmann) - 2015-04-14 09:13 +0200
Re: No Matching Records in a Script Find Helpful Harry <HelpfulHarry@BusyWorking.com> - 2015-04-14 19:28 +1200
Re: No Matching Records in a Script Find csampson@inetworld.net (Charles H. Sampson) - 2015-04-13 22:59 -0700
csiph-web