Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > PC based Database Applications > FileMaker > Searching records using variables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-16-04, 16:57
nailBnny nailBnny is offline
Registered User
 
Join Date: Apr 2004
Posts: 7
Question Searching records using variables

Howdy all,
I've reached a bit of a dead end with an idea I need to implement in my database.
Here's my situation and what I would like to do:

My database consists of multi-page forms that the users fill out. Each form has its own table due to the large number of fields required per each form. One field (Job#) is present in all tables and I've used it to relate the tables together. I’ve set up a simple form and script to view multiple forms, picked by the user, simultaneously in different windows.

What I need FM to do is automatically filter the displayed forms to show only the records with a Job# specified by the user. I know that you could manually sort each form by Job# using the Find tool but with 60+ different forms this is too time consuming. I was expecting to be able to use the Perform Find script command to do this but FM wont let me enter a field value (variable) for a Find Request Criteria.

To illustrate the script I would like to run:
Perform Find []
Action = Find Records
Criteria= Form::Table: [XXX]
Where XXX is the Job# specified by the user

Is there simple way to do what I need that I’ve just not noticed or figured out yet? I’m a novice at using FM. Any input or ideas would be greatly appreciated. I only hope I’ve explained my situation clearly enough! J

Thanks Much,
Benjamin Kemp
Reply With Quote
  #2 (permalink)  
Old 06-16-04, 18:13
pappi97 pappi97 is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
finds

Have you tried using a global field? I haven't looked into how FM7 uses globals with the new tables format, if you can span multiple tables with it, but this used to be the way to pass a variable to a script.
Reply With Quote
  #3 (permalink)  
Old 06-18-04, 10:14
nailBnny nailBnny is offline
Registered User
 
Join Date: Apr 2004
Posts: 7
Yep, I ended up using a method using global fields suggested by a fellow on another board. In case anyone here is interested:

/quote
Hello Benjamin,
It's true that the Perform Find script command in FileMaker v7 does not support the use of field values. However there are some relatively simple alternatives.

One way you might go about it is to set up your script to transfer the value(s) that you want to find into a global field prior to entering find mode, then use a Set Field[ ] comand in find mode to transfer the contents of the global field into the relevant field you wish to search on and then have the script perform the find without specified criteria (it will use the criteria entered by the Set Field [ ] steps).

That way your finds can be fully scripted, yet can also be dynamic.

--------------------
Ray
http://www.nightwing.com.au/FileMaker
/end quote
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On