Article View: comp.sys.mac.databases
Article #495Re: Searching for non-blanks while using a script in FMP2.0
From: Nick B Triantos
Date: Mon, 28 Dec 1992 21:45
Date: Mon, 28 Dec 1992 21:45
47 lines
3130 bytes
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...
Technical Details
Message-ID:
<TRIANTOS.92Dec28134554@netcom.Netcom.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!netcom!triantosReferences:
<1992Dec28.172331.7003@mnemosyne.cs.du.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.databases Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!netcom!triantos From: triantos@netcom.Netcom.COM (Nick B Triantos) Subject: Re: Searching for non-blanks while using a script in FMP2.0 In-Reply-To: mwgordon@nyx.cs.du.edu's message of Mon, 28 Dec 92 17:23:31 GMT Message-ID: <TRIANTOS.92Dec28134554@netcom.Netcom.COM> Sender: triantos@netcom.com (Nick B Triantos) Organization: Netcom Online Communications Service References: <1992Dec28.172331.7003@mnemosyne.cs.du.edu> Date: Mon, 28 Dec 1992 21:45:54 GMT Lines: 48