September 8, 201312 yr Newbies Hi there, I have a relatively simple question but I'm horribly inexperienced with FM and scripts in general. As the name suggests, I need to make some fields read only if certain parameters are met. I figure the easiest way to do this is with a script, however, beyond knowing what to write in a pseudo-code way, I'm a bit lost. I figure first I need to make the required field read-only. Then write an if statement that switches on write privileges once the criteria is met. Something like: Set field "sale price" to read only. IF status = sold field "sale price" = writable ELSE ENDIF How would I do this in FM12? I appreciate any and all help, thanks for reading.
September 8, 201312 yr FileMaker fields don't have a writable status on the field level; you can/must set the desired field behaviour of a field object on a layout, which is not possible via script. To achieve the desired effect, write a script along the lines of: If [ myTable::status ≠ "sold" ] Commit Record End If and assign it to the OnObjectEnter trigger for the salePrice field.
Create an account or sign in to comment