Hide incidents based on custom true/false field

ceraulo
Mega Guru

Hello!

I have a true/false custom field in the incidents form. This field is only visible to two groups - Group SNA and Group SNB. When the custom field is true, I want the records to be visible only to Group SNA and Group SNB. Is this possible?

Please help!

Thank you.

4 REPLIES 4

Peter Bodelier
Giga Sage

Hi @ceraulo,

 

Sure, create an ACL.

Condition: custom field = true;

 

script: gs.getUser().isMemberOf('SNA') || gs.getUser().isMemberOf('SNB')


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Hi @Peter Bodelier 

I've tried this but does not work. I've also tried gs.getUserID() and did not work.

You may have to instatiate the user first. Just wrote that as quick example.

 

var currentUser = gs.getUser(); 
answer = currentUser.isMemberOf(­'SNA') || currentUser.isMemberOf(­'SNB');

Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Danish Bhairag2
Tera Sage
Tera Sage

Hi @ceraulo ,

 

Could you try something like below. It is kind of same way which @Peter Bodelier has highlighted(tweaked a bit) but it works . Adding screenshot for reference.

DanishBhairag2_0-1696249567817.png

 

Please mark my answer helpful & accepted if it helps you resolve your query.

 

Thanks,

Danish