- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 09:02 AM
Hello, I am stuck trying to figure out why my script is not working. There are 2 set of groups. The first part works. The 2nd part is my issue - where I specify the type of group. This is how its supposed to work:
- If you are a member of the group and the group type is approval or support, show the edit button. Cannot get this to work for nothing. Please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 09:23 AM - edited ‎02-08-2024 09:24 AM
Hi @Jalen Dixon ,
Try below line using j instead of i in loop
if ((currentUser.isMemberOf(allowedGroups2[j])&& parent.type.indexOf('sysID of Approval type group') == -1) || (currentUser.isMemberOf(allowedGroups2[j]) && parent.type.indexOf('sysID of Support type group') == -1)){ // Group type is Approval or Support
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 09:23 AM - edited ‎02-08-2024 09:24 AM
Hi @Jalen Dixon ,
Try below line using j instead of i in loop
if ((currentUser.isMemberOf(allowedGroups2[j])&& parent.type.indexOf('sysID of Approval type group') == -1) || (currentUser.isMemberOf(allowedGroups2[j]) && parent.type.indexOf('sysID of Support type group') == -1)){ // Group type is Approval or Support
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand