🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.databases
2 messages
2 total messages Started by Mike Gordon Mon, 28 Dec 1992 17:23
Searching for non-blanks while using a script in FMP2.0
#491
Author: Mike Gordon
Date: Mon, 28 Dec 1992 17:23
16 lines
1151 bytes
     Is there a way to search for non-blank records in a script?  Actually,
I need to search for records that are not blank in fields W, X, Y, or Z, but
all records will have data in fields A,B,C, and D.
 
      I can't even figure out a way to get Filemaker to perform a search for 
a pre-defined string when running a script.   There must be a way to do this, 
because there are many applications I can see where you would want a button to
find all occurences of something and print a report.

      Also, is there a way to make FMP2.0 print a report to a file instead of
the printer?  I could save quite a few trees each month with this feature.

Thanks much,
 
Mike Gordon  99681084@uwwvax.uww.edu
Re: Searching for non-blanks while using a script in FMP2.0
#495
Author: Nick B Triantos
Date: Mon, 28 Dec 1992 21:45
47 lines
3130 bytes
In article <1992Dec28.172331.7003@mnemosyne.cs.du.edu> mwgordon@nyx.cs.du.edu (Mike Gordon) writes:

>Is there a way to search for non-blank records in a script?  Actually,
>I need to search for records that are not blank in fields W, X, Y, or Z, but
>all records will have data in fields A,B,C, and D.

What you can do is to set up a calculation field that would be a small IF
statement for whether the fields are blank.  Here's a way to do it:
 If (W & X & Y & Z & "_" = "_", 1, 0)
This is the preferred way to test for a blank.  What we've just done is
concatenated all four fields together, and placed an underscore at the end
of the whole thing.  If that whole mess equals just an underscore, then we
know that the first four fields were blank.  You can now have your script
Perform a Find for any records with a 1 in this calculation field, and
you'll have all the ones with W, X, Y, and Z blank...

> I can't even figure out a way to get Filemaker to perform a search for 
>a pre-defined string when running a script.   There must be a way to do this, 
>because there are many applications I can see where you would want a button to
>find all occurences of something and print a report.

Set up a Find request exactly as you want the script to do the find.  Enter
the ScriptMaker, and add the "Perform Find" command, with the "Restore"
option on.  That should do it.

If you want to find a string that could be in any one of several fields, set
up your Find by placing the string in one of the fields, asking for a "New
Request", placing the string in the second field, adding a new request,
placing it in the third, and so on.  When you perform the find, FileMaker
Pro will find any records with the string in any one of the fields you
requested it look in.  New Requests in Find mode can be thought of as
analagous to the logical OR operation.

> Also, is there a way to make FMP2.0 print a report to a file instead of
>the printer?  I could save quite a few trees each month with this feature.

Not directly, but there's a great shareware program called Print2Pict that
gives you a chooser document to which you can print.  Print2Pict will create
PICTs, extract the text, create standalong postcards, and I believe there's
even more.  Check it out by FTPing it from your favorite Mac archive site,
such as mac.archive.umich.edu, sumex.stanford.edu, etc., or from America
OnLine.

-Nick "A moose once bit my sister" Triantos

I may work in Claris Technical Support, but not when I'm logged in on
the Internet... 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads