locking fields

General support questions.
Posts: 68
Joined: Tue Jan 25, 2005 1:45 pm
PostPosted: Wed Jun 01, 2005 8:18 am
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
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Jun 01, 2005 10:21 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
PostPosted: Wed Jun 01, 2005 11:01 am
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
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Jun 01, 2005 11:20 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
PostPosted: Tue Jul 26, 2005 7:49 am
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. :oops:
JIMBO
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Jul 26, 2005 7:59 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
PostPosted: Tue Jul 26, 2005 8:11 am
When entering the calculation on the other data fields I receive message that an Operator is expected where the first ( is.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Jul 26, 2005 8:22 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

Return to General Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: