Can you post the actual script?
Are you sure that perform script is performing the script that you think that it is performing?
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.
This is the script I select on the script function 'Perform Script on Server.' As you can see it is simple.
What happens is I have a button on a layout that is set to Perform Script on Server with this script selected, lets say I have 2 records in the table that this button is on, after clicking on the button both records are deleted.
I have also had the button perform a client side script that performs the sub script on the server this way I can see if any errors, the error that comes back is 0.
I know this is something simple but apparently I'm not smart enough to figure it out.
Thanks for your help.
Sorry, the pdf file I attached did not load, so here is the script below.Its called 'test'These are the steps:Go to Layout [ “Entry” (Entry) ]New Record/RequestCommit Records/Requests[ No dialog ]Exit Script [ Result: Get ( LastError ) ]
There is no way that this script can possibly delete any records. It cannot even omit a record from the layout's found set.
But go to layout might trip a script trigger set on the Entry layout and it can also trip any number of other script triggers on other. So my best guess is that you have a script trigger performed script that is deleting records rather than this script.
And from what little that I see here, this does not look like a script that really makes sense as a script to perform on the server in the first place.
You are right and you hit it on the head, I remember now. I remember now that the script trigger is doing this. I even remember someone else talking about this and I didnt even put 2 and 2 together. Im a dummy. :)
Anyhow this is not the script i really want, I just wanted to see if the records deleted with a simple script. The script I will be running is a Credit Card processing script, but I needed to figure this out first.
Thanks for turning the lite on in my head!