Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 3776 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I would like to find out if it is possible to delete one record less than the found set /  in this case my 'found set' records are identical- i have a need to delete all found records except one. Any suggestions? thanks 

Posted

Technically, it's not possible to delete records en bloc except the entire found set. So, to delete all found records except one, start by omitting a single record. Then delete the remaining found set. If you open a new window first, then close it at the end, you will return to a found set of one in the original window.

  • Like 1
Posted

Script:

Loop
   Go to Record/Request/Page [Last]
   Exit Loop If [Get ( FoundCount ) = 1]
   Delete Record/Request [No dialog]
End Loop

When doing anything that deletes records, test on a copy first!

Posted

 i have a need to delete all found records except one. 

 

However, you do not need to delete each record in the found set individually which takes more time because it must loop the records.  Instead, and as Michael suggests, there is an easier, faster way:

New Window []
Omit Record
Delete All Records [ No dialog ]
Close Window [ Current Window ]

Michael, I would have thought that when returning to the original window, the omitted record would be included in the full record set and not isolated by itself, being the only remaining record in the original found set but I guess it makes perfect sense. This is very cool.   :laugh2:

  • 2 weeks later...
Posted

Thank you LaRetta, That is a good solution. Could I ask you how to make this apply to other request such as delete all but 2 records or delete all but 3 records, etc. That is just something I would like to know. This situation may come up for me. Thanks

Posted

Wow I experimented and figured it out for once.  I just added another 'omit record' and it increased the number of NOT omitted records by 1 so I could do delete all records except 2 for example. Thanks for guiding me to discover this. Much appreciation.

This topic is 3776 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.