- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 07:22 AM
I have created one link on Story form using UI Action but i want that link to be visible when it matches below conditions :-
1) Story state should not be "Complete" or "Cancelled".
2) the assignee (the person to whom the story is assigned) should be a member of one group i.e. "Network Team".
but this condition "current.assigned_to.isMemberOf("Network Team") == true" is not working , why
current.state != 3 && current.state != 4 && gs.hasRole("itil") && current.assigned_to.isMemberOf("Network Team") == true
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 07:59 AM
DIsagree, saying 'state is not 3 and state is not 4' will work just fine.
the use of isMemberOf() is the problem here, it's a GlideUser method so you can't use it on the current object.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 07:29 AM
Hi Mahesh,
Kindly replace
current.assigned_to.isMemberOf("Network Team") == true
with
current.assigned_to.isMemberOf("Network Team")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 07:33 AM
i did the same. it is still not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 07:39 AM
Then in your case I guess you want to make button visible only when user is part of Network Group & is logged in.
so you can use below
(current.state != 3 || current.state != 4) && (gs.getUser().isMemberOf('Network Goup'))
or
(current.state != 3 || current.state != 4) && (gs.getUser().isMemberOf('Network Goup'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2018 07:31 AM
I would put the states in an OR condition:
(current.state != 3 || current.state != 4) && .....