dbTalk Databases Forums  

find quandary

comp.databases.filemaker comp.databases.filemaker


Discuss find quandary in the comp.databases.filemaker forum.



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

Default find quandary - 12-14-2005 , 10:44 PM







IN a script I am performing a find.
I want to delete the found set. So I can replace it.
If it doesn't find anything the script stops, prompts .
I can avoid that by turning on error trapping.
Now if there are no records found it blithely comes back showing all
records, and then deletes them.
It should come back with a found set of zero, and delete that, and leave
all others intact.
How do I do this? How do I formulate a clause to navigate around this?
Thanks

--
Fritz Oppliger

Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: find quandary - 12-15-2005 , 01:25 AM






What do you think of (FMP6) :

Enter Browse mode[]
Set Error Capture[On]
Enter Find Mode []
Set Field ["YrField", ""YrFindCriterion""]
Perform Find [Replace Found Set]
If ["Status(CurrentError) = 401"]
Set Error Capture [Off]
Show All Records
Exit Script
End If
Set Error Capture [Off]
Delete All Records [No dialog]
Show All Records
Go To Record/Request/Page [First]

Remi-Noel
I think you were just missing the 'ExitScript' line.




"Fritz Oppliger" <fritzo2 (AT) direcwaywithoutallthis (DOT) com> a écrit dans le
message de news: op.s1s6d8bk2h3pac (AT) free (DOT) teranews.com...
Quote:
IN a script I am performing a find.
I want to delete the found set. So I can replace it.
If it doesn't find anything the script stops, prompts .
I can avoid that by turning on error trapping.
Now if there are no records found it blithely comes back showing all
records, and then deletes them.
It should come back with a found set of zero, and delete that, and
leave all others intact.
How do I do this? How do I formulate a clause to navigate around this?
Thanks

--
Fritz Oppliger



Reply With Quote
  #3  
Old   
Grip
 
Posts: n/a

Default Re: find quandary - 12-15-2005 , 12:42 PM



Turn Error Capture on. After the Perform Find step, put in a:

If(FoundCount)=0
Exit Script
End If


Reply With Quote
  #4  
Old   
fritzo2ster@gmail.com
 
Posts: n/a

Default Re: find quandary - 12-16-2005 , 11:31 PM



That was indeed the problem.
Thank you
Fritz


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.