Hello,
I am trying to implement a feature for a table. I need that every user who creates a record on the table "Orden", will get a default value for the field "estado_orden". At the same time, the field "estado_orden" has a lookup field from the table "estados".
I will give permission to a group to only creates records on table Orden, but they won´t be able to edit them.
So, in the field properties of my project I have checked "Read Only" and have assigned a "Default Value" with the value "Ordenada". When I do this, the default value won´t be inserted when I create a new record, however, if I unchecked "Read Only" the default value works OK.
Is this a bug?
What I want is that only the members of another group can be able to modify the field "estado_orden", but not the members of the group that has created it.
I include a screenshot of the field options of my project.
Thanks for your help.
Wilfredo
Read Only and Default Value
Read Only and Default Value
- Attachments
-
- ReadOnly-and-DefaultValue.gif (126.75 KiB) Viewed 3124 times
Re: Read Only and Default Value
Hi Wilfredo,
Not sure if it is a bug or should work like this, I solved a similiar problem in this way:
1. Leave as normal (that is do not use the readonly).
2. In the Hook (for insert and afterupdate) I discard the changes for this field and use the selection I want all the time.
Hope this helps for the time being if you are in a hurry for a quick solution.
Not sure if it is a bug or should work like this, I solved a similiar problem in this way:
1. Leave as normal (that is do not use the readonly).
2. In the Hook (for insert and afterupdate) I discard the changes for this field and use the selection I want all the time.
Hope this helps for the time being if you are in a hurry for a quick solution.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper