This case is little urgent. i need to report back to the end user. thank you
You have to do a lot more error trapping and handling in your script to see where it fails. Do an error trap after each crucual step (go to layout, go to related, each group of Set Field,...)
Make the script exit with a meaningful error so that the script that runs the PSoS script can read that error.
Also make sure that you shortcut any "on open" scripts that are set up in the so that they either do not run when the PSoS is used or that they contain no server-incompatible script steps.
1 of 1 people found this helpful
In looking at the pdfs, I see only one Set Field statement and it sets the value to 0. Everything else is set variable. These won't change the values of the data.
How can i do to make sure two side have the same result ?
Not sure how to answer that. Bruce and I have given you some pointers. Have you done extra error trapping and handling in our script? If so what is the result?
I have been done the error trapping on the script in lcoal side, it is normal.
The error comes out when the script run in server side. How can i trapping the error in server side
i am using filemaker pro 11
You trap the same way. The problem with a server side script is you have no idea it didn't work except the result is never delivered. So you need to have a way to know if an error occured.
I find the easiest way, and most effective, is to use Send Mail [ Send via SMTP Server; no dialog ]. I did a blog post on our NY User Group web site.
You can put this after each error capture and send yourself and e-mail with the exact error and section of the script. It's also not just for debugging. The case I reference in the link was a mission critical download of patient data for the next day's appointments. If it failed I would be notified. Quite useful.
I have been rewrite the script in my way (and i have been selected some field for testing) and it is attached. the result is much more closer than what i expect.
But it still have some record is become 0 when i run the testing script in the server side and a normal result will been given when the script run in local side
the"$drcode" trapping code is the case that i want to monitor. but it still become zero.
in this stage, what can i do to ensure same result will be given form both side?
The latest finding of the case is that if the perform find using $drcode to filer the "finance data" and the get(foundcount) = 1, the data is always empty (Blank). i can not pass the data to the related field. is that any method to solve this problem?
I assume you have made sure your startup script isn't doing something unexpected. Make sure your startup script (if you have one) exits the script if it is being run by the server. Remember globals fields and variables will all be reset when running on the server.
i have been checked.
The value is local and the field is indexed
Is there affect on the script when it is run in server side?
The effect is that it acts like a new user that has logged into the server. I also am assuming you check steps for compatibility with Server in the Script Window (bottom left).
Looking at your script on the server, I don't see where you have performed a find to have a set of records. So the Server has no records to process. Remember when the server runs the script, it is like a new user logging in. The current found set and layout are completely gone as far as it is concerned. You can pass a list of record ID's through the script parameter or just perform the find in the server side script.
What about my update version?
Is it better?
the target field is summary field and calculation field, can it assigned to normal field in server side?