password protect a field ?? possible?
Hey Guys, trying to pw protect a certain field in my db. is that possible?
You can password protect a record rather than a field in Manage | Database | Security. One trick is to put the field in a related record with a one to one relationship to your current table. Then the record access method will protect the field.
You can also use validation rules with get functions for the field to keep users who don't have a given account name, privilege set name or user name from modifying the field.
You can use the same functions in conditional formatting to hide the field from users who aren't authorized and script triggers to keep them from entering the field--though these two methods are layout specific and thus less secure.
hmmm.. darn, i wish there was a way when you click to enter, it will prompt for pw. =(
OR have that specific field NOT modifiable unless its a specific user logged on?
Both are possible. A script triger can be set up with Show Custom Dialog to ask for a password.
Modification by unauthorized users can be prevented with a validation rule or the Record Level Access method I described as the first option of my last post.
what woudl be a good script trigger? appreciate the help
Select the field in layout mode and specify OnObjectEnter. That will fire the script you design and specify for the trigger if the user tabs into the field or just clicks into it.
I dont have any script.. is there a template script out there?
Not really. The script would be pretty short ( and I wouldn't use a password dialog for this, I think there's a better way.)
Show Custom Dialog ["Please enter a password" ]//specify an input field for a global field, gPassword with the password option specified so that bullets are echoed instead of the password.
If [YourTable::gPassword ≠ "xyz123"] Go To Next Field  Exit Script [ False ]End If
This "password" isn't the actual password used to log in--it's just something you specified for this one instance.
I'd use a validation rule, record level access or this code:
If [ Get ( AccountPrivilegeSetName ) ≠ "[Full Access]" ] Go To Next Field  Exit Script [ False ]End If
The test inside the If step can also check for an account name instead of a privilege set name.
hmm.. how do i execute this though, run script on trigger? on modify?
OnObjectEnter for the field you want to protect in this manner.
guys worked like a charm!
Retrieving data ...