alecgregory

Open Record script step fails if in a non-modifiable or calculation field

Discussion created by alecgregory on Jun 10, 2016
Latest reply on Jun 30, 2016 by alecgregory

Product and version

FileMaker 14 and FileMaker 15 (probably earlier versions too)

OS and version

All

Description

The Open Record script step fails if the cursor is in a calculation field or non-modifiable field (e.g. a field with "Prohibit modification of value during data entry" selected in the auto-enter options).

How to replicate

Place cursor in a calculation field or non-modifiable field and run the Open Record script step. The "This action cannot be performed because this field is modifiable" dialog pops up and the record does not open.

Workaround

Check if the record is open already. If so, do not attempt to open it. If not, commit the record (this takes the cursor out of the field without triggering OnRecordCommit steps, though it does trigger OnObjectExit script steps on the field) and then run the Open Record step. It's not easy to get the cursor back into the original field though. You'd need to use object naming which is tiresome.

Outcomes