Read Only and Default Value

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
wilmira
Veteran Member
Posts: 78
Joined: 2013-07-11 18:00

Read Only and Default Value

Post by wilmira » 2014-12-06 00:41

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
Attachments
ReadOnly-and-DefaultValue.gif
ReadOnly-and-DefaultValue.gif (126.75 KiB) Viewed 3125 times

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: Read Only and Default Value

Post by AhmedBR » 2014-12-08 13:02

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.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

Post Reply