Elegant Find

  • Follow


I am trying to implement a elegant find whereby if the item being searched 
for is not found a "custom dialog" is displayed advising of that fact, and 
the script takes the user back to the screen from which the search was 
executed.

I have looked at the Business Tracker sample that Filemaker.com has for 
download, but it is structured a bit differently.  I figured a if, elseif 
would work, but not sure on which variable, maybe the Get(FoundCount) 
function?

I know how to construct the find and the custom dialog, but unsure of where 
to place the function that returns whether or not any records are found.

TIA,
Jay 



0
Reply Jay 9/28/2004 5:04:43 PM

Jay wrote:

> maybe the Get(FoundCount) 
> function?
> 

Close. Check the number returned by Get(CurrentError). In the Help it 
lists the error numbers. One of them is for "No Records Found"
0
Reply Kevin 9/28/2004 5:36:06 PM


JMO did an article for FileMaker Advisor a couple of years ago that
described how to do this. If you are a subscriber it is probably still
on line. I believe he had previously done an example file on this and it
may still be available on his site or fmfiles.com.

If all else fails write back and I'll send you a file with the script I
use

Jay <jw_in_in@yahoo.com> wrote:

> I am trying to implement a elegant find whereby if the item being searched
> for is not found a "custom dialog" is displayed advising of that fact, and
> the script takes the user back to the screen from which the search was
> executed.
> 
> I have looked at the Business Tracker sample that Filemaker.com has for
> download, but it is structured a bit differently.  I figured a if, elseif
> would work, but not sure on which variable, maybe the Get(FoundCount)
> function?
> 
> I know how to construct the find and the custom dialog, but unsure of where
> to place the function that returns whether or not any records are found.
> 
> TIA,
> Jay 
0
Reply bobemery 9/30/2004 12:43:56 AM

in article 1gkunqa.1d34so0169odl0N%bobemery@bellsouth.net, Bumper at
bobemery@bellsouth.net wrote on 9/29/04 5:43 PM:

Go to his site:
http://www.databasepros.com/resources.html

and do a find for Ultimate Find

The file has two examples of a script, the second one is the one you would
be interested in.

HTH

Lee


> JMO did an article for FileMaker Advisor a couple of years ago that
> described how to do this. If you are a subscriber it is probably still
> on line. I believe he had previously done an example file on this and it
> may still be available on his site or fmfiles.com.
> 
> If all else fails write back and I'll send you a file with the script I
> use
> 
> Jay <jw_in_in@yahoo.com> wrote:
> 
>> I am trying to implement a elegant find whereby if the item being searched
>> for is not found a "custom dialog" is displayed advising of that fact, and
>> the script takes the user back to the screen from which the search was
>> executed.
>> 
>> I have looked at the Business Tracker sample that Filemaker.com has for
>> download, but it is structured a bit differently.  I figured a if, elseif
>> would work, but not sure on which variable, maybe the Get(FoundCount)
>> function?
>> 
>> I know how to construct the find and the custom dialog, but unsure of where
>> to place the function that returns whether or not any records are found.
>> 
>> TIA,
>> Jay 

0
Reply Lee 9/30/2004 2:51:11 PM

I would suggest using the Status(CurrentError) function. It is placed right
after the perform find.  Make sure you set error capture to on.

Something like this...

Set error capture on

Perform find
If status(currenterror) = 401
Display dialog "unable to find item"
Go to layout
End if

Hope this helps.

G.Miller


"Jay" wrote:

> I am trying to implement a elegant find whereby if the item being searched
> for is not found a "custom dialog" is displayed advising of that fact, and
> the script takes the user back to the screen from which the search was
> executed.
> 
> I have looked at the Business Tracker sample that Filemaker.com has for
> download, but it is structured a bit differently.  I figured a if, elseif
> would work, but not sure on which variable, maybe the Get(FoundCount)
> function?
> 
> I know how to construct the find and the custom dialog, but unsure of where
> to place the function that returns whether or not any records are found.
> 
> TIA,
> Jay 
> 
> 
> 


0
Reply G 9/30/2004 2:59:26 PM

Tried http://www.databasepros.com/resources.html but the link for the
article was to advisor.com and the link is dead.

Thank you for your info though!

Jay

"Lee Smith" <canepa6645@charter.net> wrote in message
news:BD816B6F.B355%canepa6645@charter.net...
> in article 1gkunqa.1d34so0169odl0N%bobemery@bellsouth.net, Bumper at
> bobemery@bellsouth.net wrote on 9/29/04 5:43 PM:
>
> Go to his site:
> http://www.databasepros.com/resources.html
>
> and do a find for Ultimate Find
>
> The file has two examples of a script, the second one is the one you would
> be interested in.
>
> HTH
>
> Lee
>
>
> > JMO did an article for FileMaker Advisor a couple of years ago that
> > described how to do this. If you are a subscriber it is probably still
> > on line. I believe he had previously done an example file on this and it
> > may still be available on his site or fmfiles.com.
> >
> > If all else fails write back and I'll send you a file with the script I
> > use
> >
> > Jay <jw_in_in@yahoo.com> wrote:
> >
> >> I am trying to implement a elegant find whereby if the item being
searched
> >> for is not found a "custom dialog" is displayed advising of that fact,
and
> >> the script takes the user back to the screen from which the search was
> >> executed.
> >>
> >> I have looked at the Business Tracker sample that Filemaker.com has for
> >> download, but it is structured a bit differently.  I figured a if,
elseif
> >> would work, but not sure on which variable, maybe the Get(FoundCount)
> >> function?
> >>
> >> I know how to construct the find and the custom dialog, but unsure of
where
> >> to place the function that returns whether or not any records are
found.
> >>
> >> TIA,
> >> Jay
>


0
Reply J 10/1/2004 1:15:15 AM

I take it the dialog that normally pops up when no records are found will
not popup when this script is used?  My script had everything but the Set
Error capture off.

I will have to wait until I get to work tomorrow to test your script sample.
Thanks for the help!

Jay

"G.Miller" <sorry@idontwant.spam> wrote in message
news:BD81978E.177A%sorry@idontwant.spam...
> I would suggest using the Status(CurrentError) function. It is placed
right
> after the perform find.  Make sure you set error capture to on.
>
> Something like this...
>
> Set error capture on
>
> Perform find
> If status(currenterror) = 401
> Display dialog "unable to find item"
> Go to layout
> End if
>
> Hope this helps.
>
> G.Miller
>
>
> "Jay" wrote:
>
> > I am trying to implement a elegant find whereby if the item being
searched
> > for is not found a "custom dialog" is displayed advising of that fact,
and
> > the script takes the user back to the screen from which the search was
> > executed.
> >
> > I have looked at the Business Tracker sample that Filemaker.com has for
> > download, but it is structured a bit differently.  I figured a if,
elseif
> > would work, but not sure on which variable, maybe the Get(FoundCount)
> > function?
> >
> > I know how to construct the find and the custom dialog, but unsure of
where
> > to place the function that returns whether or not any records are found.
> >
> > TIA,
> > Jay
> >
> >
> >
>
>


0
Reply J 10/1/2004 1:26:34 AM

Found the link for the article! http://filemaker.advisor.com/doc/08899  it
is a free article.

Thanks
Jay

"J" <jw_in_in@yahoo.com> wrote in message
news:Dc27d.6113$ls6.4299@newsread3.news.atl.earthlink.net...
> Tried http://www.databasepros.com/resources.html but the link for the
> article was to advisor.com and the link is dead.
>
> Thank you for your info though!
>
> Jay
>
> "Lee Smith" <canepa6645@charter.net> wrote in message
> news:BD816B6F.B355%canepa6645@charter.net...
> > in article 1gkunqa.1d34so0169odl0N%bobemery@bellsouth.net, Bumper at
> > bobemery@bellsouth.net wrote on 9/29/04 5:43 PM:
> >
> > Go to his site:
> > http://www.databasepros.com/resources.html
> >
> > and do a find for Ultimate Find
> >
> > The file has two examples of a script, the second one is the one you
would
> > be interested in.
> >
> > HTH
> >
> > Lee
> >
> >
> > > JMO did an article for FileMaker Advisor a couple of years ago that
> > > described how to do this. If you are a subscriber it is probably still
> > > on line. I believe he had previously done an example file on this and
it
> > > may still be available on his site or fmfiles.com.
> > >
> > > If all else fails write back and I'll send you a file with the script
I
> > > use
> > >
> > > Jay <jw_in_in@yahoo.com> wrote:
> > >
> > >> I am trying to implement a elegant find whereby if the item being
> searched
> > >> for is not found a "custom dialog" is displayed advising of that
fact,
> and
> > >> the script takes the user back to the screen from which the search
was
> > >> executed.
> > >>
> > >> I have looked at the Business Tracker sample that Filemaker.com has
for
> > >> download, but it is structured a bit differently.  I figured a if,
> elseif
> > >> would work, but not sure on which variable, maybe the Get(FoundCount)
> > >> function?
> > >>
> > >> I know how to construct the find and the custom dialog, but unsure of
> where
> > >> to place the function that returns whether or not any records are
> found.
> > >>
> > >> TIA,
> > >> Jay
> >
>
>


0
Reply J 10/1/2004 2:12:14 AM

Yes you are correct. The set error capture on step will suppress the
standard error dialog.

FYI, its a good idea to turn the capture on and off within the script to
prevent unwanted results.  Some errors cannot be anticipated.

ie.
Turn Error capture on (when you expect an error)
Test for error (error codes can be found in help menu)
Turn error capture off
Do other stuff

When error capture is on, your script may get an error and your script may
not perform correctly because the error is ignored and filemaker just moves
onto the next step.

Good luck!

G

"J" wrote:

> I take it the dialog that normally pops up when no records are found will
> not popup when this script is used?  My script had everything but the Set
> Error capture off.
>

0
Reply G 10/1/2004 2:27:25 AM

8 Replies
148 Views

(page loaded in 0.096 seconds)


Reply: