- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 09:37 AM
can we use both condition and check the logged in users role in the advanced view rules ?
as we cannot use the current element in the view rules
how do we check condition (where open RITM is from software catalog ) and logged in user has itil role then go to ess view.
can some one help me with this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 10:45 AM
If you need to check the user's role then you have to use the advanced script. In your other post I showed how to get both with an advanced script:
https://community.servicenow.com/community?id=community_question&sys_id=63545a6bdbbe6700d6a102d5ca961937
But also from your other post you mention to check against a Portal page as well. The view rules won't work if you're viewing a record using a "ticket" page because the ticket page doesn't direct pull in the "form" directly. Although, you can set the "view" it can use via the url it's pulling that from the url and then setting that view in the server script.
Viewing a record with the "form" page is made more in line with the platform view and will execute view rules. Thus in order to use the actual "view rules" setup with portal you'll need to view the RITM using the form page or a page using the form widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 10:45 AM
If you need to check the user's role then you have to use the advanced script. In your other post I showed how to get both with an advanced script:
https://community.servicenow.com/community?id=community_question&sys_id=63545a6bdbbe6700d6a102d5ca961937
But also from your other post you mention to check against a Portal page as well. The view rules won't work if you're viewing a record using a "ticket" page because the ticket page doesn't direct pull in the "form" directly. Although, you can set the "view" it can use via the url it's pulling that from the url and then setting that view in the server script.
Viewing a record with the "form" page is made more in line with the platform view and will execute view rules. Thus in order to use the actual "view rules" setup with portal you'll need to view the RITM using the form page or a page using the form widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2019 12:05 PM
Thanks Chris for the reply.
Is there any thing I need to change in the below solution ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 10:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2019 03:43 PM
Would you mind giving a little more details?
When you say "It's not working" what does that exactly mean? No logging coming out?
What's the url you're using, (you can leave off the instance name if you need to)?
Are you getting errors? Is it not working platform side or portal or both?