Page 1 of 1
locking fields
Posted:
Wed Jun 01, 2005 8:18 am
by jim shelton
I am looking for a way in FM 6 to lock fields. Example is a sales person enters data then locks the field. Should the field need to be edited they click button to unlock.
Posted:
Wed Jun 01, 2005 10:21 am
by John Sindelar
There are certainly a lot of ways to do this (scripting, separate layouts, etc.) but one nice way is with field validation. You'd validate the field in question to be something like:
YourLockCheckbox <> "Locked" (where <> is "does not equal")
The field "YourLockCheckbox" would be your switch, formatted as a checkbox that salespeople use to lock, unlock the field they wish to edit. Format the field as a checkbox with one value: "Locked".
Hope that helps.
Posted:
Wed Jun 01, 2005 11:01 am
by jim shelton
thanks for the reply.
sometimes I'm slow to catch on. do you mean that every field would need to be a checkbox?
would a script for the entire record in that layout be easier to manage? if so what steps would the script use?
thanks,
Posted:
Wed Jun 01, 2005 11:20 am
by John Sindelar
There don't need to be *any* scripts here really- and you'd just need one YourLockField per record. Basically each field in the record has the same validation calculation (YourLockField <> "locked") and then checking and unchecking the one lock field locks and unlocks all records so validated.
Locking fields
Posted:
Tue Jul 26, 2005 7:49 am
by jim shelton
Finally getting back to this challenge. I have created a field, YourLockCheckBox and check validate by calculation. Here is the calcuation
YourLockCheckBox <> "Locked" ( where <> is "does not equal")
obivously something is missing.
Posted:
Tue Jul 26, 2005 7:59 am
by John Sindelar
Just a couple things to check...
The checkbox selection for the lock field will enter the text "locked" when checked, the checkbox is a text field, and your validation calc is on the data field(s) you wish to validate, not on the lock field itself.
Let me know...
Locking Fields
Posted:
Tue Jul 26, 2005 8:11 am
by JIMBO
When entering the calculation on the other data fields I receive message that an Operator is expected where the first ( is.
Posted:
Tue Jul 26, 2005 8:22 am
by John Sindelar
=)
The "( where ..." thing was just there as an explanation, it is not part of the calculation. Sorry for not being more clear. Just remove everything between and including the parens.