Delete all records should delete only the records in the found set. If you are getting records deleted that were not in the found set, there is either something not right with this script, or a "delete" option in Manage | Database | relationships is causing a cascading delete that is clearing the entire table.
i checked all relationships in the relationship windows. but the delete button is allways off.
is the function in the menu delete found set doing exactly the same like the script step?
because this one works like it should be.
The script step works exactly like the menu option.
Something in your script or a different script performed by a script trigger tripped by your script is changing your found set to include all records before this delete step is performed.
You might want to post your script so that others can examine it for possible issues.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.