field is read only for everyone except 2 groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 03:17 AM
Hey, I've created a new field in the form and I want it to be read only to everyone but that two groups can have access to filter this field - it's a reference. I want to create an acl for this case but I don't know the best way to do it. What would be the best way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 03:21 AM - edited ‎11-23-2022 03:22 AM
You mean to make field editable for two group members?
If yes you can create write level ACL on the field and in script section use below logic:
if(gs.getUser().isMemberOf("sys_id of the group 1") || gs.getUser().isMemberOf("sys_id of the group2"))
answer=true;
else
answer=false;
answer;
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 04:07 AM
That's what I was thinking, but I'm having trouble with the code. thank you very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 03:22 AM
Hi @New user1212,
You can try with Data policy with condition Assignment group is not group1 or group2.
Make the field as read-only true.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2022 03:26 AM
As per my knowledge, you can create a new role and map that role with groups.
And you can create an ACL for that new field and map the newly created role into it.
Thanks
Please mark it as helpful if it works for you.