Write a View Rule (View Should be visible to Regional Manager)

Anusha Gorige
Tera Contributor

Write a View Rule (View Should be visible to Regional Manager)

1 REPLY 1

Tai Vu
Kilo Patron
Kilo Patron

Hi @Anusha Gorige 

In the View Rule form, let's check the Advanced checkbox.

The Script box will be displayed, you can use gs object there to verify the current user and then redirect them to the specific view per requirement.

(function overrideView(view, is_list) {
	
	if(gs.hasRole('itil')){
		answer = '<view_name>';
	}

	if(gs.getUser().isMemberOf('<group>')){
		answer = '<view_name>';
	}

})(view, is_list);

Screenshot 2023-11-10 at 16.03.03.png

 

Cheers,

Tai Vu