How to add condition in UI Action.

Hrishabh Kumar
Giga Guru

I have created a UI action button on server form.

I need that UI action button should be visible to the logged in user if

1) the user belongs to the group which is in "assigned_to" field of that server.

 

Example:

In this case the logged in user should be a part of GLBL_CloudCoe group, in order to see the button or to use the button.

serverForm2.PNG

 

Here is my UI Action:

uiAction2.PNG 

1 ACCEPTED SOLUTION

Hrishabh Kumar
Giga Guru

gs.getUser().isMemberOf(current.assignment_group.name) worked for it.

View solution in original post

3 REPLIES 3

newhand
Mega Sage

@Hrishabh Kumar 

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

Please mark my answer as correct and helpful based on Impact.

Hrishabh Kumar
Giga Guru

gs.getUser().isMemberOf(current.assignment_group.name) worked for it.

newhand
Mega Sage

both work...

Please mark my answer as correct and helpful based on Impact.