Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4434 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

Just started to use FM, built a simple database, with 6 layouts my question is:

Is there a way to lock all fields but one in a layout to avoid changing data? I was thinking in a Radio button or a check box to lock/unlock the layout.

I found a topic by Mr Steven H. Blackwell, that seems to be easy task but I could no perform at previlege level :(

I would like step by step if I am not asking too much.

Cheers,

Posted

One of the easiest ways to do this is to use a field set to 1 or 0, automatically enter 1, to block editing of the entire record via Record Level Access. The one filed can be placed in a related table with a 1:1 relationship to the main table.

When the record is created, the value in the field is 1. At some time when the record is ready to "lock" change that field to 0. You must protect the flag field ( the 1 or 0) by making it inaccessible to users at the field level access level.

Steven

  • Like 1
Posted

Steven's suggestion is excellent. Just want to add that the record locking only works for users that are using an account with the restricted privilege set. Users with full access will not experience the record locking because they have full access i.e., completely unrestricted. :D

Only developers should have full access accounts, and developers should not be doing data entry. Everybody else should have suitable restrictions imposed, even if it's read-write-delete to all tables but no design.

  • Like 1
  • 2 weeks later...
  • 5 months later...
Posted

One of the easiest ways to do this is to use a field set to 1 or 0, automatically enter 1, to block editing of the entire record via Record Level Access. The one filed can be placed in a related table with a 1:1 relationship to the main table.

When the record is created, the value in the field is 1. At some time when the record is ready to "lock" change that field to 0. You must protect the flag field ( the 1 or 0) by making it inaccessible to users at the field level access level.

Steven

I have similar needs to Monolocs, and though I have read and re-read Steven's suggestion many times, I just can't wrap my mind around it.

I assume he is referring to Account Privileges when he speaks of Record Level Access. I don't see any way to change the access level via a script. What am I missing?

It seems that an OnLayoutEnter and OnRecordLoad script trigger that would put a 1 in the locking field (a checkbox), and then allowing the user to uncheck the field to allow editing, and then an OnLayoutExit script to put 1 back in the locking field is all that is needed. All I'm trying to prevent is accidental editing of the record, not password protection. It's the how to prevent editing part that has me stumped.

By the way, I have seen suggestions of having alternate layouts that are not editable, but that seems like overkill.

Posted

I don't see any way to change the access level via a script. What am I missing?

There is no need to change the access level once it has been defined; all you change is the value of the field which determines the access level.

Posted

By the way, I have seen suggestions of having alternate layouts that are not editable, but that seems like overkill.

It also does not work. The UI is not part of the security schema. Just because the layout isn't editable does not mean that the value in some field also isn't editable.

Stick with the Privilege Set settings; that's what they are there to do.

Steven

Posted

It also does not work. The UI is not part of the security schema.

Well, it does work when:

All I'm trying to prevent is accidental editing of the record, not password protection.

Although a tab control with two panes might be a better solution than two layouts.

This topic is 4434 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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