a!isUserMemberOfGroup( username: loggedInUser(), groups: cons!IP_GRP_RECRUITERS )
So this above code i gave it so that that particular field is visible to the specific user from the specific group only, but its not working when i gave it in a read only grid. This code did work in the normal interface and it only showed the particular field to the particular user of specific group only , but when i gave it in the read only interface, its not working. What anyone help me with what might be the issue.
Discussion posts and replies are publicly visible
In a read-only grid, you need to apply the showWhen parameter to the grid column itself, not to fields inside the column.
a!gridColumn( label: "Column Name", value: fv!row.fieldName, showWhen: a!isUserMemberOfGroup( username: loggedInUser(), groups: cons!IP_GRP_RECRUITERS ) )
What is the correct way to put this showwhen field in a local variable. Can you please guide me through it.
Firstly, Your main issue got solved?
Yes ,Now this above one is a different interface.
Define the local variable before using it in the grid column. Use the same condition that was previously inline. Reference the variable in the showWhen parameter
a!localVariables( local!textField, local!isDisplay: a!isUserMemberOfGroup( username: loggedInUser(), groups: cons!ACM_GRP_ADMINS ), /*Replace this with your grid*/ a!textField( label: "Field", value: local!textField, saveInto: local!textField, showWhen: local!isDisplay ) )