AnsweredAssumed Answered

A script step of set field allows me to override field controls

Question asked by hdawson on May 15, 2015


A script step of set field allows me to override field controls


FileMaker Pro



Operating system version

Windows 7

Description of the issue

I just found out this was true by a stupid mistake, but it makes a lot of sense in light of other weird things I have seen over the years.  I was writing a script and had a set field function and accidentally chose the wrong field.  The field I chose was my primary key, which was a serial number and is set to prohibit modification during user entry.  But because it was a script step saying to set that field, it worked!  Like I said, this was a stupid mistake in this case, but in the past every once in a while I see records with a messed up primary key because all of a sudden it has == in front of it.  Well, we have scripts that say, go to such and such layout and find the record that matches this primary key, using == as an operator.  But unfortunately every once in a while (like 1 in a 1000, maybe) the user has done something that causes the script to operate in browse mode.  I can't totally explain why.  Maybe multiple windows, I don't know.  But the point is, if I have set up the field so that the user can't modify it, a script shouldn't be allowed to either.


I have to go to define database, turn off the restriction on modification, fix the field on the record, then go turn the restriction back on.