We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

UI action visibility to watch list field users

iagruthijonnaga
Giga Contributor

Hello,

On knowledge article form, i want only "knowledge base" managers( mangers is a watchlist field on kb_knowledge_base) to view a UI action (example - "Import"). i have tried doing it in Onload client script , by using for loop, got success with for loop but not with UI action visibilty.

 

Thanks 

Jagruthi

1 ACCEPTED SOLUTION

Rajesh M1
Giga Guru

HI Jagruthi,

 

Use below condition in the UI action

 

current.kb_knowledge_base.WATCH_LISTFIELD_NAME.toString().indexOf(gs.getUserID()) > -1

Mark answer as correct if it solves your query.

Regards,

Rajesh M.

View solution in original post

2 REPLIES 2

Rajesh M1
Giga Guru

HI Jagruthi,

 

Use below condition in the UI action

 

current.kb_knowledge_base.WATCH_LISTFIELD_NAME.toString().indexOf(gs.getUserID()) > -1

Mark answer as correct if it solves your query.

Regards,

Rajesh M.

Hi Rajesh, 

 

That worked , thanks

But then i used Script include and achieved it.

will be using this as its gonna minimize my script