Scripted conditions for Workspace View Rules not working?

JStockel
Tera Expert

Hi,
I'm working on a custom workspace in a scoped application.
Now, I want to apply some workspace view rules. (Already applied what I needed in core/native UI, works great there).
My conditions are quite complex, therefore the need of it to be scripted. Basically reviewing access to certain records and the level of access based on roles. I've started simple to apply it to just one role.

I have created the UX View Rules Configuration record, I've also added its sys_id to the associated UX Page Registry. I've also created the viewRuleConfigId to the UX Page Properties.
I've tried with a normal condition checking if active = true, as a test and it works.

As this hasn't been working so far, I've added client script + script include to hide some fields in the workspace view instead based on these conditions. Works well.
However, hiding Related List items is clearly not the easiest. I've checked UI Builder on it as well, and as far as I can tell, I can hide the tab when needed, but not specific items listed under it.

Anyone with ideas regarding either Workspace View Rules, or hiding specific Related Lists items in Workspace?

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@JStockel 

it's not going to work directly.

check this workaround

Can activity be hidden in workspace? 

💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

There's now a script field to be used on Workspace View Rules, which has already been attempted. For my requirement, I can't really just use a dynamic filter either, unfortunately.