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.

Unable to call gs.getProperty() in UI action

soumyadaggula
Tera Contributor

Hello Team , 

I want to restrict the UI action to few catalog items , for which I have created a sys property and I am referencing the sys property in UI action , but that does not seams to work , cloud you please help me where am I going wrong 
Here is what I have used 


soumyadaggula_0-1713530510086.png

 

1 ACCEPTED SOLUTION

Hi @soumyadaggula,

 

If it's a comma-separated list, try the following script:

current.assigned_to == gs.getUserID() && gs.getUser().isMemberOf(current.assignment_group) && gs.getProperty('sc.task.create').contains(current.request_item.cat_item)

View solution in original post

7 REPLIES 7

Hi @James Chun 
I have added 3 catalog items sys_id's "," separated in  'sc.task.create'  property .

Hi @soumyadaggula,

 

If it's a comma-separated list, try the following script:

current.assigned_to == gs.getUserID() && gs.getUser().isMemberOf(current.assignment_group) && gs.getProperty('sc.task.create').contains(current.request_item.cat_item)

Thanks a Ton @James Chun , this worked  🙂