The CreatorCon Call for Content is officially open! Get started here.

Hide Assign to Me UI Action if user is not part of current assignment group.

jason_lindsey
Kilo Contributor

I'm trying to hide the Assign to Me UI Action in sn_customerservice to where it will only show after an Assignment Group is selected and if the current user is a member of the Group. I have tried using  gs.getUser().isMemberOf(current.assignment_group) as the condition but it is not working. I can use an OnChange client script to do this but it does not work if the Assignment Group field is empty. Does anyone know of another UI Action condition that would solve this?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

isMemberOf() uses a display name, so try this instead...



gs.getUser().isMemberOf(current.assignment_group.getDisplayValue())


View solution in original post

6 REPLIES 6

You're close Richard.



current.assigned_to != gs.getUserID() // current assigned_to is not me


current.assigned_to.nil() // current assigned to is   empty



put them together



current.assigned_to != gs.getUserID() || current.assigned_to.nil()   // current assgined_to is not me or empty


Fantastic, many thanks as always.