Make field editable when group is eligible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 12:44 AM - edited 06-26-2025 12:48 AM
Hi All,
Please help me on below ACL Part
there 3-groups in system property and a field (time_worked) on incident list am trying to create write ACL to make field editable for user who is part the group in system property, when i try to make field edit for any other groups which is not there in system property then (time_worked) field should be readonly.
Can any one assist me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 01:16 AM - edited 06-23-2025 01:22 AM
Hi @jaip3040,
please try to add script to the ACL on the update rights in the field.
Something similar to this (not tested, just a drafty):
var userGroups = gs.getUser().getMyGroups(); //eventually call the system property you mentioned
var allowedGroups = ['sys_id1', 'sys_id2', 'sys_id3'];
if (allowedGroups.indexOf(current.assignment_group.toString()) > -1) {
answer = true;
} else {
answer = false;
}
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 01:30 AM
Hi @jaip3040 ,
replace incident with your table name and field with your field name
and put this in the script
and replace your.group.properties.name with your property name
answer = (function() {
var listOfgroups = gs.getProperty('your.group.properties.name').split(',');//replace with your property name
var myGroups = gs.getUser().getMyGroups().toString();
for (var i = 0; i < listOfgroups.length; i++) {
if (myGroups.includes[listOfgroups[i]])
return true;
}
return false;
})();
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2025 04:01 AM
hi @Chaitanya ILCR
thanks for the response,
but it is not checking wheather user is part of any group from system property can you please assist how to check that
my requirement: if user is part of any group in system property then that user should edit field on list,Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2025 04:20 AM
Hi @jaip3040 ,,
that script should work
answer = (function() {
var groups = gs.getProperty('your.group.properties.name');//replace with your property name
var listOfgroups = groups ? groups.split(',') : [];
for (var i = 0; i < listOfgroups.length; i++) {
if (gs.getUser().isMemberOf(listOfgroups[i]))
return true;
}
return false;
})();
if not try this
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya