Fabio19
ServiceNow Employee
ServiceNow Employee

This is a handy guide on how to use view rules in a Workspace Experience.

Below are the steps to follow:

1. If not already available, create a UX View Rules Configuration record for your workspace experience (sys_ux_view_rules_configuration) via menu Next Experience → Configuration Settings → UX View Rules Configurations. Save the SysId and memorize the name.

 

2. Select your Workspace experience UX Page Registry configuration record via menu Now Experience Framework → Experiences or directly from the table sys_ux_page_registry.

Sample screenshot

find_real_file.png

 

3. Create a new property from the UX Page Properties related list at the bottom with the following values:

Name: viewRuleConfigId
Type: string
Value: the SysId of the UX View Rules Configuration record created in step 1

 

4. Now you can create your Workspace View Rule record via menu Workspace Experiences → Workspace View Rules, or from sysrule_view_workspace, and configure it accordingly associating the UX View Rules Configuration record created in step 1 from the relative list at the bottom.

Sample screenshot

find_real_file.png

Comments
Muskan Dixit
Tera Contributor

Hi, I have followed the same process but its not working in Tokyo instance.

It's working fine in Rome one, any update on this?

Fabio19
ServiceNow Employee
ServiceNow Employee

Hi,

The guide was based on a Tokyo instance and documentation. I just repeated the above steps on another Tokyo instance (patch 3) and I successfully used a new custom form view through a new Workspace View Rule.

Are you trying to use it on the CSM/FSM configurable workspace or on new custom workspace experience?

Muskan Dixit
Tera Contributor

Hi,

Thanks for your reply, I am trying on new custom workspace, as it was working fine on my previous instance so I suspected issue could be because of Tokyo instance.

If you have ServiceNow document for same, can you please provide docs links, that might be helpful to check if am missing anything else other than this.

Fabio19
ServiceNow Employee
ServiceNow Employee

Hi Kilo,

I just tried to do it in a custom new workspace experience, and for me it worked but I had to uncheck first the property "Experience Restricted" in the Workspace View Rule (step 4).

Let me know if it worked for you.

Regarding the documentation, I will check in the coming days and will post the link here if I find something useful for this specific configuration.

Muskan Dixit
Tera Contributor

Hi,

Thank you for this information, it worked!

However as this field was not present in my Rome instance, and in this instance it was showing as unchecked only but when I again checked and unchecked it, view rules started working.

Uma2
Tera Expert

Hi Team, 

 

 Can anyone help me to understand how to change tje Related List Layout in configurable workspace.

 

Thanks,

Uma.

DorianK
Tera Expert

I am also struggling a bit with the Related List Layout as well as the Form Layout. It "sometimes" loads. Is there a specific role that is needed? Admin works - but if it is not an admin it doesn't. It is just defaulting to the "workspace" view (which is defined by that view property). I've also tried to do this in a domain separated instance (since that table supports domains) and it seems to also cause issues.

MagnusSchlamovi
ServiceNow Employee
ServiceNow Employee

I have been struggling with the related list layout too, and I found that the layout adjusts based on the Default View. That is, open the record in the traditional UI, right-click form header of related list, select "configure list layout", configure the layout for the view called "Default View" (not just Default).

DorianK
Tera Expert

@MagnusSchlamovi - I ended up just configuring the related list layout on the "workspace" view since the CSM/FSM workspace defaults to it. Not ideal - but got me out of the pain of dealing with views. Will look into the "Default View" situation if I run into more issues.

MagnusSchlamovi
ServiceNow Employee
ServiceNow Employee

@DorianK - I should add that I am working with a "home-made" workspace.

 

By the way, I have tried to follow the instructions in this post to make a view rule (including unchecking the "Experience Restricted" checkbox) but have had no luck in making this work.

DorianK
Tera Expert

@MagnusSchlamovi - if you look at the CSM workspace they have a "view" property as well (that says it defaults to that view if one isn' found). If all you need is just 1 view - then you can probably mimic that property (but don't know where the logic is forcing that)

MagnusSchlamovi
ServiceNow Employee
ServiceNow Employee

@DorianK - are you referring to the view rules or a different record? On the view rule, the View property is mandatory, and I already populated it with the view specific to my custom workspace (below image shows the view rule for interactions on the CSM workspace, just for context for anyone wondering what we are talking about).

 

MagnusSchlamovi_0-1676995314019.png

 

DorianK
Tera Expert

I was referring to "Experience" Page Registry

DorianK_0-1676998332856.png

 

 

https://<instance>.service-now.com/nav_to.do?uri=sys_ux_page_property.do?sys_id=3d9b58fd53c3101043d7ddeeff7b1275

Fabio19
ServiceNow Employee
ServiceNow Employee

Hi guys,

 

@MagnusSchlamovi is taking you to the right place. From the View Rules Configuration record used by your experience (sys_ux_view_rules_configuration) you can see the view used, most likely Workspace.

Then:

1) in classic UI, right click on the 3 dots menu..

Fabio19_0-1676998365921.png

2) add the columns you wish, I added Updated

Fabio19_1-1676998660595.png

3) you should see the new layout for that record (Task SLA in my sample)

Fabio19_2-1676998748631.png

 

Please check which View Configuration record is used by your experience first

Fabio19_3-1676998826206.png

 

Hope it helps.

MagnusSchlamovi
ServiceNow Employee
ServiceNow Employee

Thank you @Fabio19

 

Have you tried this with custom workspaces? I have done everything described:

- View Configuration created with two related View Rules

- Experience page property viewRuleConfigId set with sys_id of the View Configuration record

- "Experience Restricted" unchecked on the View Rules

 

But the view rules don't take effect. I am trying the "Hide Details and UI actions" and reordering tabs, but to no avail.

Fabio19
ServiceNow Employee
ServiceNow Employee

Hi @MagnusSchlamovi,

Got it. I suggest to play with what you can do on your workplace experience as admin, for instance adding columns on a related list layout should create a record in sys_ui_list and you should see which view your experience is using (removing your user it will make the list layout available to all):

 

Fabio19_0-1677086612118.png

 

Or, if you want to manipulate your form view:

Fabio19_1-1677086773510.png

 

 

Which instance version are you on? I will check this more deeply in the coming days...

 

MagnusSchlamovi
ServiceNow Employee
ServiceNow Employee

Hi @Fabio

 

Got it. I suggest to play with what you can do on your workplace experience as admin, for instance adding columns on a related list layout should create a record in sys_ui_list and you should see which view your experience is using (removing your user it will make the list layout available to all):

 

Yes, this was my approach. Confusingly, the normal (not related list) list layouts are maintained in sys_ux_list (for anyone who might be struggling with that).

 

For form views, there is no problem, these act as expected being governed by the view specific to my workspace.

 

I am working on a Tokyo instance.

 

Thanks for helping out!

Kannan Nadar
Tera Guru

Hello @Fabio19,

I have a table called Approval Request which is related to any child tables of OOB Case table. Now I have created different views for each child table for Approval Request table, but when I create a view rule with condition as "Case.Task Type = Type A" then it doesn't seems to work. If I update my condition pointing to a choice field like "Service type = Ground" then it picks up the correct view.

Have you came across this type of issue before?

Mikias Tefera
Tera Contributor

hey guys. I have a question on email quick message ,

how to configure email quick message for compose email in workspace side

Bob Hardy
Tera Contributor

@Fabio19 - Thanks for this. This works as I would expect it to, but only after clearing the "Experience Restricted" checkbox.

snow-developer
Tera Contributor

Hi @Fabio19 , Thanks for this article. I am able to use the view rule for workspace but I wanted to call script Includes in workspace View rule like we used to do in Native View rule using advanced. 

Is there any possible way to achieve it?

VikasG663213750
Tera Explorer

@snow-developer I have a default view in the platform UI that includes all trade-specific fields and auto-populates the incident number. I would like to display the same view in the Service Operations Workspace. Could you please guide me step by step on how to activate or configure this default view in the workspace

Version history
Last update:
‎07-26-2022 04:05 AM
Updated by: