Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

locking some records / prevent record edits

Featured Replies

i am working on a filemaker 8 database and i wish to be able to prevent edits to a record if the record is marked "complete". i don't wish to lock all records in the database, just the complete ones.

i was hoping i don't have to do a check on each field.

it would be great if certain access levels had the ability to alter 'complete' records as well.

my searches for 'lock records' have not yeilded anything pertaining to what i wish to do.

thanks!

  • Author

i also realize i can force the user to a layout, based on that 'complete' flag, where they would not be able to alter fields.

wasn't sure if there was another way.

Create a number field called Lock or something like that. Auto-enter a value of 1. In Define Accounts & Privileges, make editing of the records conditional on the value in that field. When you're ready to lock the record, change the value--probably by script--from 1 to 0. When the field is set to 0, the record cannot be edited.

HTH

Steven

  • Author

ahhh...i was looking for an option in accounts and privileges, but i didn't dig deep enough.

thanks for pointing me in the right direction!

and your suggestion should do the trick.

Thank you old Advance man...

I am looking at some thing similar, I haven't tried it but looks like your concept can also work for say on inventory, if an inventory is written off, we don't want users to be able to modify it...

  • 1 month later...

Does that mean once the lock field is set to '0' no user can 'ever' unlock the record ?

Locking of records is something users have asked me for, but they have not thought through the process completely, which has always puzzled me, as I can see the same users 'calling' to ask how to unlock the record, as they didn't really mean to lock the record, and if you give them (or a 'master' user) the function to unlock, then the record really isn't 'locked' - is it ?

Users seem to ask what they 'want' not what they need . . .

mav

Mav--

Anyone with Full Access will be able to edit everything in the file (or change the file so that it can then be changed). The only way you might be able to set a permanent lock would be to strip the file of Full Access privileges one you're done with development.

You can also put in routines that change things back if a user makes a mistake. These routines might be set to require a password, or be just onerous enough that your users will learn not to act rashly ("Please type 'I will not lock my records rashly!' FIVE TIMES to unlock this record."). However, I don't believe that this approach will win you any friends in your user base.

You might also set up a system that allows users to change things back--but you create a record behind the scenes of the fact that they changed the status back and forth.

David

Locking and unlocking the record can exist and function independently of Full Access Accounts. It all depends on how you set it up and how effectively you control the processes.

Steven

  • Newbies

Does this work any differently when you want to 'lock' a portal row? Is this possible? If so, how do you lock a portal row and then how do you 'unlock' a corresponding row using a script?

It essentially works the same way. The lock is in the record in the related table. The portal merely displays the record.

Steven

  • 3 weeks later...

This is almost what I need to do--

I need to be able to lock all but one field in a portal record.

Specifically, on a requisition form, once the requisiton has been approved and signed off on (with a password, by the Principal), the only field on the record that should remain editable is a "Quantity recieved" field that is filled in when the requisition comes in. (To prevent items from being added to the requisition after it's been approved.)

Locking the whole thing seems easy, using the above suggestions. Not quite sure how to do this, though... Suggestions?

-Dane

Beautiful! Thanks!

  • Newbies

I thought the calculation to allow entry would look like this:

field name="1"

However, this does not work. What am I missing?

I followed the steps recommended, creating a field that has either a 0 or 1 (depending on whether or not I want to allow editing of the record).

Well you now have to go into the field definition of the field you're protecting and tell it to validate against that 0 or 1 value.

Steven

  • Newbies

It works. Thanks for your help.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.