locking fields
8 posts
• Page 1 of 1
Posts: 68
Joined: Tue Jan 25, 2005 1:45 pm |
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.
JIMBO
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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. John Sindelar
SeedCode |
Posts: 68
Joined: Tue Jan 25, 2005 1:45 pm |
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, JIMBO
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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.
John Sindelar
SeedCode |
Posts: 68
Joined: Tue Jan 25, 2005 1:45 pm |
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. JIMBO
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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... John Sindelar
SeedCode |
|
When entering the calculation on the other data fields I receive message that an Operator is expected where the first ( is.
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
=)
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. John Sindelar
SeedCode |
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests