I just want to make a filemaker script to create a found set containing all
records where Status is New or Alert.
I created three sub-scripts:
FindNothing: Perform Find [Replace found set]. (Find criteria is impossible
value). This is to empty the found set.
FindNew: Perform Find [Extend found set]. (Find criteria is Status=New).
This is to add 'New' records to the found set.
FindAlert: Perform Find [Extend found set]. (Find criteria is
Status=Alert). This is to add 'Alert' records to the 'New' records in the
found set.
Finally I created a script that simply runs these three sub-scripts in
succession.
The resulting found set is not what I'd expect, but I'm hard-pressed to
describe it.
What would be the smartest way to do this?
Also, sometimes my sub-scripts do not seem to properly remember the find
criteria, although I am clicking "Replace" in the relevant dialog. How does
one find out what a script thinks its find criteria is?
|
|
0
|
|
|
|
Reply
|
clh (8)
|
4/18/2004 2:22:05 AM |
|
In article <BCA7507D.1F25%clh@pobox.com>, Chap Harrison <clh@pobox.com>
wrote:
> I just want to make a filemaker script to create a found set containing all
> records where Status is New or Alert.
>
> I created three sub-scripts:
>
> FindNothing: Perform Find [Replace found set]. (Find criteria is impossible
> value). This is to empty the found set.
>
> FindNew: Perform Find [Extend found set]. (Find criteria is Status=New).
> This is to add 'New' records to the found set.
>
> FindAlert: Perform Find [Extend found set]. (Find criteria is
> Status=Alert). This is to add 'Alert' records to the 'New' records in the
> found set.
>
> Finally I created a script that simply runs these three sub-scripts in
> succession.
>
> The resulting found set is not what I'd expect, but I'm hard-pressed to
> describe it.
>
> What would be the smartest way to do this?
I'm not sure why you're doing much of the above, but if I understand
correctly what you're trying to do, then try one script with something
like this:
Enter Find Mode []
Set Field [Status, "New"]
New Record/Request
Set Field [Status, "Alert"]
Perform Find []
Depending on what you're trying to do you may want some error checking
in there in case there are no matching records (eg. to give a custom
error message).
> Also, sometimes my sub-scripts do not seem to properly remember the find
> criteria, although I am clicking "Replace" in the relevant dialog. How does
> one find out what a script thinks its find criteria is?
Stored Find Requests (and the other bits like Sorting) can be useful,
but usually they're just a pain - it's often easier to do a script like
the above where you can manual set your needs in the script instead.
The only way you can see what's actually stored for Finds, Sorting,
etc. is to print (or print preview) the script.
Helpful Harry
"Hopefully helping harassed humans happily handle handiwork hardships" ;o)
|
|
0
|
|
|
|
Reply
|
Helpful
|
4/18/2004 3:33:27 AM
|
|
In article <180420041533277807%helpful_harry@nom.de.plume.com>, Helpful
Harry <helpful_harry@nom.de.plume.com> wrote:
>In article <BCA7507D.1F25%clh@pobox.com>, Chap Harrison <clh@pobox.com>
>wrote:
>
>> I just want to make a filemaker script to create a found set containing all
>> records where Status is New or Alert.
>>
>> I created three sub-scripts:
>>
>> FindNothing: Perform Find [Replace found set]. (Find criteria is impossible
>> value). This is to empty the found set.
>>
>> FindNew: Perform Find [Extend found set]. (Find criteria is Status=New).
>> This is to add 'New' records to the found set.
>>
>> FindAlert: Perform Find [Extend found set]. (Find criteria is
>> Status=Alert). This is to add 'Alert' records to the 'New' records in the
>> found set.
>>
>> Finally I created a script that simply runs these three sub-scripts in
>> succession.
>>
>> The resulting found set is not what I'd expect, but I'm hard-pressed to
>> describe it.
>>
>> What would be the smartest way to do this?
>
>I'm not sure why you're doing much of the above, but if I understand
>correctly what you're trying to do, then try one script with something
>like this:
>
> Enter Find Mode []
> Set Field [Status, "New"]
> New Record/Request
> Set Field [Status, "Alert"]
> Perform Find []
>
>Depending on what you're trying to do you may want some error checking
>in there in case there are no matching records (eg. to give a custom
>error message).
This is the way to go. But to elaborate a little for the original
poster's benefit (who sounds like a newbie), you only need to do one find,
not three. Your first find "empties the found set" by finding something
impossible. There is no need to do this, as any find always works on all
records, regardless of how many found records are currently available, or
"on display."
The next two finds tended to cancel each other out. You run a find for
"New" and this is what you get. Now you run a different find for "Alert",
and as the find works on all records, you will lose the "New" batch and
end up with only records that have "Alert".
When you run three different find scripts in a row like that, the result
is as if you had run only the last script by itself. Harry is showing you
how to get the job done by making two different requests within the same
find, to get either "New" or "Alert."
Steve Brown
|
|
0
|
|
|
|
Reply
|
eyebrown
|
4/18/2004 12:15:12 PM
|
|
On 4/18/04 7:15 AM, in article
eyebrown-1804040814360001@sdn-ap-021tnnashp0325.dialsprint.net,
"eyebrown@mindspring.com" <eyebrown@mindspring.com> wrote:
> In article <180420041533277807%helpful_harry@nom.de.plume.com>, Helpful
> Harry <helpful_harry@nom.de.plume.com> wrote:
>
>>
>> Enter Find Mode []
>> Set Field [Status, "New"]
>> New Record/Request
>> Set Field [Status, "Alert"]
>> Perform Find []
>>
> This is the way to go. But to elaborate a little for the original
> poster's benefit (who sounds like a newbie), you only need to do one find,
> not three. Your first find "empties the found set" by finding something
> impossible. There is no need to do this, as any find always works on all
> records, regardless of how many found records are currently available, or
> "on display."
Re: newbie - guilty as charged! ;-)
Harry's procedure worked just fine. And thanks, Steve, for the elaboration
on Finds. I was stumbling around through the scripting commands without a
roadmap or a clue.
Thanks to both of you.
Chap
|
|
0
|
|
|
|
Reply
|
Chap
|
4/18/2004 12:44:14 PM
|
|
In article <180420041533277807%helpful_harry@nom.de.plume.com>,
Helpful Harry <helpful_harry@nom.de.plume.com> wrote:
> In article <BCA7507D.1F25%clh@pobox.com>, Chap Harrison <clh@pobox.com>
> wrote:
>
> > Also, sometimes my sub-scripts do not seem to properly remember the find
> > criteria, although I am clicking "Replace" in the relevant dialog. How does
> > one find out what a script thinks its find criteria is?
>
> Stored Find Requests (and the other bits like Sorting) can be useful,
> but usually they're just a pain - it's often easier to do a script like
> the above where you can manual set your needs in the script instead.
>
> The only way you can see what's actually stored for Finds, Sorting,
> etc. is to print (or print preview) the script.
Unless, of course, you have FileMaker Developer. I use Debug Script past
the Find point, exit the script and Refind to see what my find criteria
are.
Clumsy, but more on the fly than a print or print preview.
--Lisa
|
|
0
|
|
|
|
Reply
|
Lisa
|
4/19/2004 4:01:46 PM
|
|
|
4 Replies
319 Views
(page loaded in 0.08 seconds)
Similiar Articles: Find and global fields in FileMaker 7 FollowFM 7 Mac OS X In my customer database I'm trying to set up a script that either use the name enterered in a global text field to make a new record or... Find mode- scripts-multiple criteria - comp.databases.filemaker ...I am using Filemaker Pro 5.5 on Windows XP. I have three contact names in my database. (contact1, contact2, and contact3). Each contact has it's own field with ... Script: Finding a record marked with a field equal to AccountName ...Hi all, I have to make a Web interface where the user has to input data on his record only. So I marked the record with a field containing his Accoun... run script on entering a field - comp.databases.filemaker ...Is there any way to execute a script automatically when you enter or exit a field in Browse mode? Thanks, David ... attach script to field? - comp.databases.filemakerIs it possible to attach a script to a field, so that always when the content is changed, the script runs? I'd like to run a script on a global field,... Perform Find in Script - comp.databases.filemaker... comp.databases.filemaker ... > Two number fields - can I do a find where field 1 > field 2? Not a Find as such, but you could make a script like this: Loop If (field 1 ... Script (button) to open another database and copy in the specific ...Copy field info to another field automaticly - comp.databases ..... the script does a Replace Field Content ... Script (button) to open another database and copy in the ... If Statement - comp.databases.filemakerI have a startup script that goes like this: IF Get ( PrivlegeSetName ) = "Manager" or "Salesrep" Show All Records else Enter Find Mode Set Field ..... FMP script: which button was clicked in Show Custom Dialog ...... comp.databases.filemaker ..... script the Find process: 1) User clicks a "Find Date Range" button 2) Enters their date range into a field or custom dialog ... script ... Formating Date field in a Find Mode - comp.databases.filemaker ...is a part of the field's value. For that matter, I was not able to insert by script any of the permissible find operators. Evidently, I am doing something wrong; some ... How to Write a Script that Finds Records Created in the Last 30 ...One of the options for a date field is to automatically enter today's date ... Perform Find [] To save the script: Close the window and save or click OK to return to the ... Powershell or vb script that finds the value in the Redirect To ...If a Powershell script can help me find these redirects, would someone help me out with ... The "Redirect To: field has http://www.domain.org/doma in/archive s" in ... 7/9/2012 10:14:53 AM
|