This has been discussed before, and does happen, but I can't seem to find the thread. What error messages, if any are you getting with the debugger?
It may be helpful to provide more information, like what do you mean by 'not working'.
If you can post your script that may also help.
The most common way to get a difference in results is simply the fact that the script pauses and updates the screen on every step. In a few cases, that can result in different results. You can also have a script where subtle differences in your found set/current record/sort order etc can result in it "working" sometimes and not others. That sometimes creates the illusion that it works in the Debugger and fails when not in the debugger.
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.
Steve, the script debugger shows no errors. The trouble the live script produces is duplicate records in the join table (but with different related id's on one side of the relationship). And based on what you said, Phil, about the debugger updating after each script, I suspect it is a missing commit records step. I use Matt Petrowsky's id field calculation, which prevents duplicate ids on merges by replacing itself in that one situation. I'm guessing when I make a new record, I get one id, but after modifying the record before committing it, get a new id. This would explain getting no duplicate records in the main table, but getting them in the join table. I'll play around with this some more (and if it works, make sure I always put a commit records step after making a new record.)