Read Only Depends On for Role condition

I just want to have a field being read only if the user is project users. So I tried this but was not working…

1 Like

Hi @mana_mana,

Please try this.

eval:frappe.get_roles != "Projects Manager"

Reload and check it.



Dear all,

ist there any way to do something like eval: frappe.session.user == ‘User selected in custom field’ or do I have to write a custom script to exclude the majority of users?
I have a custom field within a custom doctype and only those (multi select) users selected shall be able to change the value of the custom field.

Thanks in advance!

@NCP I can’t get it to work too. In Display Depends On field on DocType User:

user == ""

of which is the name of Doc.

The DocField’s Perm Level is at 0, and I can see it displaying when logs in and display his My Settings.

Strange. May be there are still bugs lurking in there.

I’m on Frappe v13.49.x.

Plesae check it.


@NCP the result of the condition statement must be True or False.

It works!

Much much thanks! You helped me a lot!