If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > FileMaker > Omit records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-25-06, 11:06
Jenny_Leipzig Jenny_Leipzig is offline
Registered User
 
Join Date: Apr 2006
Posts: 5
Omit records

How can I merge the following conditions into a find request (within a script)?

field1 = Get(ScriptParameter)
AND field2 = 2
AND field3 = >0
AND field4 != 6 (this Filemaker does not support in find-requests...)

The first 3 conditions I can find via
Enter Find mode[]
Set field ...
Set field ...
Set field ...
Perform Search[]

But I don't know how to add the fourth condition because "omit records" only works with PerformFind[Restore], which is incompatible with the first condition...
Reply With Quote
  #2 (permalink)  
Old 04-25-06, 20:14
chriscozi chriscozi is offline
Registered User
 
Join Date: Apr 2004
Posts: 61
Find and omit

What's wrong with performing the find and then perfoming another omit within the same script? Don't forget to work within the current found set.
We used to have to do successive finds in the same script. This should be no different.
Reply With Quote
  #3 (permalink)  
Old 04-25-06, 20:29
<Ender> <Ender> is offline
Registered User
 
Join Date: Aug 2005
Location: Minneapolis, MN
Posts: 56
Or do it in one Find with two requests:

Enter Find Mode []
Set Field [ field1 ; Get(ScriptParameter) ]
Set Field [ field2 ; 2 ]
Set Field [ field3 ; >0 ]
New Record/Request
Set Field [ field4 ; 6 ]
Omit Record
Perform Find []
Reply With Quote
  #4 (permalink)  
Old 04-26-06, 03:40
Jenny_Leipzig Jenny_Leipzig is offline
Registered User
 
Join Date: Apr 2006
Posts: 5
OMIT again

Quote:
Originally Posted by chriscozi
What's wrong with performing the find and then perfoming another omit within the same script? Don't forget to work within the current found set.
We used to have to do successive finds in the same script. This should be no different.
There are 2 ways of programming the find-request:
1. Enter FindMode[] > SetField[...] > PerformFind[]
2. Perform Find[Restore] //FindRequest specified within

Now as I want to use Get(ScriptParameter) (for the first condition), I have to use way1.
But for condition 4 I have to use way2 because saying "does not equal 5" only works with OMIT, and this only works with way2.
Then I have to combine the two, which I cannot do via

Enter FindMode > SetField[field1; Get(ScriptParameter)] > PerformFind[] > ExtendFoundSet[Restore] /where Restore is " OMIT field4 = 5 "

because this would be an OR-search rather than an AND-search...
Reply With Quote
  #5 (permalink)  
Old 04-26-06, 20:48
<Ender> <Ender> is offline
Registered User
 
Join Date: Aug 2005
Location: Minneapolis, MN
Posts: 56
It is not necessary to restore the omit condition. See my above post.

(Perhaps you're having trouble with the forum too? It seems to give me a different set of replies everytime I refresh it.)
Reply With Quote
  #6 (permalink)  
Old 05-02-06, 19:35
drakedane drakedane is offline
Registered User
 
Join Date: May 2006
Posts: 7
Quote:
Originally Posted by Jenny_Leipzig
How can I merge the following conditions into a find request (within a script)?

field1 = Get(ScriptParameter)
AND field2 = 2
AND field3 = >0
AND field4 != 6 (this Filemaker does not support in find-requests...)

The first 3 conditions I can find via
Enter Find mode[]
Set field ...
Set field ...
Set field ...
Perform Search[]

But I don't know how to add the fourth condition because "omit records" only works with PerformFind[Restore], which is incompatible with the first condition...
Not sure exactly what you're trying to do, but I more or less agree with the other poster, since I just had to do something like this. However, I opted for a very clunky, but workable, scripting solution, which involved first getting my basic found set through a standard find. Then, I used a looping script to mark up the found set a certain way (to ID the records I wanted to omit); Then I used a second looping script to omit the records so marked.

Again, clunky and a bit tricky to write; but, for my purposes, it worked fine.
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On