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.

How to restrict changes on fields

Featured Replies

Hello

 

When i create a layout with my database, the fields are automaticaly ready to receive any changes from the user, and i would like to know if is possible to enter on the layout only to "see" the records, and made any changes only when the user press the "edit" button.

Thanks for your help

 

I´m using the Filemaker 13 Advanced

 

  • Author

Thanks for the link :-)

 

It´s possible to make a script to change the parameter "Browse Mode" of the field (Inspector-Data)? I notice when i deactivated this parameter, i can see the content of the field but it´s not possible to change the data. Then i can set this parameter off for all the fields and make a button whit a script to activate this parameter.

 

Thanks for the help

It´s possible to make a script to change the parameter "Browse Mode" of the field (Inspector-Data)?

 

No, it is not possible.

You can use Security to control whether a User can make changes by toggling a global variable FIELD called gRestrict and including that variable FIELD in custom privileges for data access to Records.  Select the table and modify the Edit capabilities to limited, similar to:  not gRestrict ... where gRestrict is a toggle button of:  not gRestrict

 

To make it friendly, you can attach script trigger to all fields OnObjectKeystroke and script can be:

If [ gRestrict]
Show Custom Dialog [ "You can not modify this record." ]
Exit Script [ false ]
End If

Security is the only really safe way, whereas script trigger just allows for nicer message and control.  

 

Corrected 'variable' to 'field' as clarified by Comment in next post.

Edited by LaRetta

You can use Security to control whether a User can make changes by toggling a global variable

 

I don't think Carlos' purpose is security; it seems it's only to prevent accidental modification. But if it were, then this is important: you should never use script variables (neither global nor local) to control privileges. Users can easily modify a variable's value (for example in Data Viewer, if they have the Advanced version) and circumvent this kind of "security". Use a global field to which the users have no access whatsoever and which can be modified only by running a script with full privileges.

You are absolutely correct - my mistake.  I took the script trigger method and mixed it with Security.  Use a global field in security.  Thank you for the correction, Michael.

 

I have corrected my post accordingly.

Edited by LaRetta

I don't think Carlos' purpose is security; it seems it's only to prevent accidental modification. 

 

 

I thought this as well at first but I decided that it best to mention security since someone might read it and apply it to a situation where it IS critical that it be enforced.   Accidental modification can have just as serious consequences ... accidentally changing an invoice after month-end posting etc.  

 

I like the theory of belt and suspenders.  :-)

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.