Access group attribute Technical Staff?

I need to show/hide field/button based on the group attribute “Technical Staff” in Administration --> Group --> Technical Staff.

I’m trying the following code:

<field name="field1" hideIf="!__user__.group.technicalStaff" />

I just came to know, We simply can write if instead of hideIf/showIf in order to show/hide the button based on group attribute:

<field name="field1" if="!__user__.group.technicalStaff" />

1 Like

Hello,

“hideIf/showIf” attributes run a javascript script, so we only can use the client side values.
“if” attribute run a groovy script on the server, so we can use the dotted field to get a parameter.
However, “if” attribute is only run one time when we open the first time the views. If the value changes, you need to refresh the browser tab. In your case, it should work because you use a “fixed” value for a user.
In other business cases, the best way can be to use an action-attrs with groovy expression and call it when you load the record or when we update a value.

Regards

2 Likes