dbTalk Databases Forums  

Perform Find help

comp.databases.filemaker comp.databases.filemaker


Discuss Perform Find help in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
krollenhagen
 
Posts: n/a

Default Perform Find help - 12-19-2006 , 02:13 PM






I am a newbie to filemaker and scripting. Field1 is always set to one
of the following: Entered, Approved, Completed, See Notes. I want to
use a script to find all records where Field1 is not Completed.

I tried starting out with the following by looking at other scripts in
our db that the developer put in.

Allow User Abort [Off]
Set Error Capture [On]
Go to Layout ["Admin"]
Enter Find Mode []
Insert Text [Select, "Field1","Approved"]
Perform Find [Replace Found Set]
Go to Layout ["Layout2"]
Enter Browse Mode []

The admin layout has the Field1 on it. Layout2 is a list view. If I
go to Layout2 and show all records and then run the script, I still
show all records in the list view instead of just the ones that are
marked approved.

So, I would appreciate help with getting the find to work as well as
finding all records except Completed.

Thank you.

krollenhagen


Reply With Quote
  #2  
Old   
krollenhagen
 
Posts: n/a

Default Re: Perform Find help - 12-19-2006 , 02:14 PM






I forgot to mention that I am using FMP6.0. Thanks.


Reply With Quote
  #3  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Perform Find help - 12-19-2006 , 03:43 PM



krollenhagen wrote:

[FMP 6]
Quote:
Field1 is always set to one
of the following: Entered, Approved, Completed, See Notes. I want to
use a script to find all records where Field1 is not Completed.
Search for completed records and then show omitted. In one step: Seach
for completed records with the option 'omit' turned on.

If you want to script it, just try step by step. Use 'pause script' to
check the progress on a given point. If the scripted search seems to
fail, cmd-R will show you what the latest search term works.

Do not turn error capture on if you want to see what the problem is. You
can do that later if all goes when - and you know what you're actually
doing it for.

--
http://clk.ch


Reply With Quote
  #4  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Perform Find help - 12-19-2006 , 05:30 PM



In article <1166559224.037567.304270 (AT) 73g2000cwn (DOT) googlegroups.com>,
"krollenhagen" <keith.rollenhagen (AT) gmail (DOT) com> wrote:

Quote:
I am a newbie to filemaker and scripting. Field1 is always set to one
of the following: Entered, Approved, Completed, See Notes. I want to
use a script to find all records where Field1 is not Completed.

I tried starting out with the following by looking at other scripts in
our db that the developer put in.

Allow User Abort [Off]
Set Error Capture [On]
Go to Layout ["Admin"]
Enter Find Mode []
Insert Text [Select, "Field1","Approved"]
Perform Find [Replace Found Set]
Go to Layout ["Layout2"]
Enter Browse Mode []

The admin layout has the Field1 on it. Layout2 is a list view. If I
go to Layout2 and show all records and then run the script, I still
show all records in the list view instead of just the ones that are
marked approved.
It's possible that Field1 on the Layout2 layout is either set to not
allow data entry or isn't even on the layout. The Insert Text command
needs to have the field on the layout and be allowed to enter data.

But the script above will only find the "Approved" records anyway.



Quote:
So, I would appreciate help with getting the find to work as well as
finding all records except Completed.
There's two basic ways to achieve this.

A. You can find both "Entered" AND "Approved" records and
then use the "Show Omitted" script command to swap the
Found records with the 'unfound' records:

Enter Find Mode []
Set Field [Field1, "Entered"]
New Record / Request
Set Field [Field1, "Approved"]
Perform Find
Show Omitted


B. You can perform a 'Not' find of the "Completed" records
(ie. find records that are not "Completed"):

Enter Find Mode []
Set Field [Field1, "Completed"]
Omit Record
Perform Find


Note: Niether of these partial-scripts have any error capturing to make
sure that there are actually any records found by the Perform Find
script command.















Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #5  
Old   
krollenhagen
 
Posts: n/a

Default Re: Perform Find help - 12-20-2006 , 08:03 AM



Thank you. Got that working. Now, I would also like to be able to
show all Field1 NOT "Completed" AND DatePromised < a user entered date.

How do I get a text entry box to pop up in a script and capture the
user input and then use that as a variable in the script.

Thanks for the help.

Keith


Reply With Quote
  #6  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Perform Find help - 12-20-2006 , 01:46 PM



In article <201220061230418785%helpful_harry (AT) nom (DOT) de.plume.com>, Helpful
Harry <helpful_harry (AT) nom (DOT) de.plume.com> wrote:

Quote:
In article <1166559224.037567.304270 (AT) 73g2000cwn (DOT) googlegroups.com>,
"krollenhagen" <keith.rollenhagen (AT) gmail (DOT) com> wrote:

So, I would appreciate help with getting the find to work as well as
finding all records except Completed.

There's two basic ways to achieve this.

A. You can find both "Entered" AND "Approved" records and
then use the "Show Omitted" script command to swap the
Found records with the 'unfound' records:

Enter Find Mode []
Set Field [Field1, "Entered"]
New Record / Request
Set Field [Field1, "Approved"]
Perform Find
Show Omitted
snip

D'oh! There's an obvious mistake here - the "Show Omitted" command
shouldn't be there since you DO want the "Entered" and "Approved" ones.

Sorry. The pre-Christmas rush of people wanting to get stuff done
before they go on their holiday break must be getting to me. \


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #7  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Perform Find help - 12-21-2006 , 11:33 PM



In article <1166623435.457905.314190 (AT) t46g2000cwa (DOT) googlegroups.com>,
"krollenhagen" <keith.rollenhagen (AT) gmail (DOT) com> wrote:

Quote:
Thank you. Got that working. Now, I would also like to be able to
show all Field1 NOT "Completed" AND DatePromised < a user entered date.

How do I get a text entry box to pop up in a script and capture the
user input and then use that as a variable in the script.
Sorry, I have no idea how the new user-entry message window works.

You can get around it by using a Global field. Simply have the user
enter the required date into the Global field (g_FindDate) and then run
a script that is something like:

Enter Find Mode []
Insert Calculated Result [JobDate, ">" & DateToText(g_FindDate)]
New Record / Request
Set Field [Field1, "Completed"]
Omit Record
Perform Find []

The script will be similar for using the user-enter message window.
Because you need to use the Insert command the JobDate field needs to
be on the layout and be enabled for user entry.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.