Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Request to be visible to the requestor and particular group based on filed selected in Catalogue.

Sumit Mahto
Tera Contributor

I'm creating a catalogue item, in that I'm having a Yes/No field named Confidential and when yes is selected then the request raised should be visible to requestor and a particular group. I tried with ACL but there is an ACL which is overriding it now going with Business Rule, need help to achieve this.

1 REPLY 1

Murthy Ch
Giga Sage

@Sumit Mahto 
So, you don't want to make these request items visible to other groups?
If that's the case you can write before query BR and try something like below:

BR condition:
Item is "Your catalog item"

Advanced script:

In script condition:

current.variables.confidential=="Yes" && !gs.getUser().isMemberOf("ARC") && current.request.requested_for!= gs.getUserID()
//replace with your variable name and group name

Script:

(function executeRule(current, previous /*null when async*/ ) {
current.addQuery("item" "!=", "CATALOG ITEM NAME");
})(current, previous);

 (not tested) 

Try this and let me know if any issue

Thanks,
Murthy