How can I disable the the delete record, duplicate record and create record buttons in the menu
For my application I need to be able to disable the buttons and menu options that delete a record, duplicate a record or create record.
Since there is no other way e.g. to prevent a user from deleting a record that should not be deleted. (I created buttons inside the form to delete a record (and check beforehand that it makes sense to delete it).
I am using the macOS app.Thanks!
10 replies
-
For the create and duplicate you can put delete this in the trigger on create field of the table properties. To disable deletion, therefore i have no solution. I 'll put a request in the Beta team for this.
-
Hi Steven, thanks for your quick reply. My guess is that "delete this" is not a viable solution since it would be triggered also when a record is created via a script (which is likely going to happen) thus preventing any record creation.
-
You can also use delete this with a if statement.
-
Please can you elaborate on that. Is there is a way to distinguish between a delete triggered via a script vs. via the menu option? So I could catch that with an if statement? Could it be that there is a plist setting for the app to turn off these menu options? Thanks!
-
At this time.. to disable (or enable) delete by "role" .. I believe you need to move to the Ninox Cloud version.
Here is the macApp version.
And here is the Ninox Cloud version.
-
Thanks a lot for that additional piece of information. Moving to the cloud with this data is not an option. So I will have to hope that the macOS app will be devloped further in this respect and see what to do in the meantime.
-
If your desire is to continue the use of Ninox.. AND provide the role based security .. You can always deploy an on prem version ..
-
I've tried it with an if then statement and it doesn't work in the trigger on create. Today I have requested this feature in the Beta team for future updates. Hopefully in one of the coming releases it will be integrated.
-
Thanks a lot! I think beaing able to control the create, duplicate and delete functions in Ninox is important - esp. for more complex application uses.
-
@nn... I cannot quickly find it.. There was another (and maybe a few) thread that covered history / recovery of deleted TABLE ROWS.. From memory .. the strategy was to create hidden / shadow tables that were populated with an "after update" trigger .. This way.. if a row from the main table was delete.. on purpose or on error.. there was a shadow / history table that had the last known copy. Not ideal.. but potentially a work around for you. Having a "before delete" trigger would be AWESOME.. :)
Content aside
- 5 yrs agoLast active
- 10Replies
- 4705Views