5 Replies Latest reply on Oct 11, 2012 7:26 PM by philmodjunk

    Locking data?

    Epa

      Title

      Locking data?

      Post

           I have a portal that allows users to type contacts into a contacts record.  Is there any way that I can set the portal row/fields to LOCK after the comments typed are committed?

           Thanks

            

        • 1. Re: Locking data?
          philmodjunk

               You can easily lock the entire portal record using manage security. You can lock individual fields by setting a validation calculation in field options.

               Both methods would use a boolean expression to selectively lock a field or a record such as:

               IsEmpty ( commentField )

               But the first method uses this expression in Manage Security and the second on the validation tab in Field options.

               (Note: The validation rule will permit acccessing and attempting to edit the data, but a "locked" field will then reject those changes and display an error message.)

          • 2. Re: Locking data?
            Epa

                 Ok, I'm looking into the second method.  Various users will be entering comments into the portal, so I want to make sure the comments are "locked" for security and malicius attempts to alter another users comments.  If I use a calculated validation on the comments field: IsEmpty ( commentField );  Then comments cannot be tyoed into since only an empty field is valid.  What am I missing here?

            • 3. Re: Locking data?
              philmodjunk

                   You didn't specify that the comments field was one of the fields you wanted to lock.

                   I recommend setting up access privileges so that users are only permitted to edit the portal records they created.

              • 4. Re: Locking data?
                EP

                     I want to lock the field for everyone.  I.e. once they commit, the data is locked in and cannot be manipulated.  Is there no way to do this?

                • 5. Re: Locking data?
                  philmodjunk

                       That doesn't sound to me to be practical given how often entered comments need revision--often seconds after you exit the field, but yes it is possible. Both methods can be adjusted to permit this. It takes scripting to control access to the comment field and then the value in the comment field can lock the rest of the record or selected field if that is desirable.

                       Add a global field to your database for entering comments. When the user logs a new comment, they enter it into the global text field. Then a script can "save" the comment by creating a new record and using set field to copy the value from the global field to the locked portal field. If you use manage security settings, you can set the script to "run with full access privileges" to enter the data.