does it take any other field entries?
maybe the file is read-only?
Can't think of any reason it might have changed between 13 and 14. Two suggestions:
1. Make a new test file and try to replicate the behaviour in this context. If it behaves expected this might give you some clues as to why it's happening in your live file.
2. You could try posting your file or your script on the forum.
What does the error code 201 say the problem is. You can look this up in the help file.
1 of 1 people found this helpful
Four possible reasons for that error:
- Field access permissions for the field, for the current user's privilege set do not permit modification.
- Field options in Manage Database for the field prohibit modification.
- You are setting a field in a related record via a relationship that has "allow creation..." enabled, but the match field in this new record is a field that does not permit modification. (and the error is thrown on this match field, not the field being modified by the set field step.)
- The field is a calculation field.
You have ruled out #4, but have you checked the other three?
THANK YOU ALL for your helpful suggestions....appreciate your time...
Thank you so much for taking the time to address my FM scripting problem. I DID a test for all of the possible reasons you suggested and they were most helpful. All of these reasons checked out and were already set properly but worth the time to recheck. However, your #3 suggestion prompted me to re-check the fields that were used in the legacy relationship. I noticed that one of the fields in the relationship was set to Lookup data from another file. This prompted me to try adding a "Commit Records/Request (no dialog)" step in two places in my Loop script. WORKING!!! So thank you again for taking the time. I was at a standstill and your idea prompted me to get back on track! NOTE: I was using a Lookup in one of my match fields because it relies and sets a "Wanted Contract #" field based on the portal row that the user clicks on. Apparently, the script (which goes through a LOOP as well) was not given time to recognize the change in "Wanted Contract #" for each portal row (called by the script). I think the "Commit Records/Request" step allows the script to stop for a millisecond and recognize the new Looked up "Wanted Contract #" in each new portal row it comes to in the Loop. I had never experienced this problem in previous FM versions but I have seen it happen a lot using FM 14. Anyway; thanks for taking the time. Richard
Error 201 is field cannot be modified.
Often the code definition lends a clue...