Service Portal: Run view rules on Form Widget

SanjivMeher
Kilo Patron
Kilo Patron

Hi Xperts,

I am working on a Form with various state. For each state I have a different view. So every time I change the state, the corresponding view should apply.

How can I make the view rule work on Service Portal Form Widget?


Please mark this response as correct or helpful if it assisted you with your question.
1 ACCEPTED SOLUTION

Yes. It actually works OOB using the form widget. I just need to set the first view while opening the form. So I pass the view name to the form widget. Otherwise it will go to the Default view. All other view rules work as expected.



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

10 REPLIES 10

@SanjivMeher  How to pass the view name to the form widget?

In the url, along with the table name, sys id, also pass &view=<view name>


Please mark this response as correct or helpful if it assisted you with your question.

@SanjivMeher Where do we need to specify that? I mean form widget is read-only so should we write a script for it?

How do you navigate to the form widget?

The widget which takes you to the form widget should have an option to specify the view.


Please mark this response as correct or helpful if it assisted you with your question.

Thais Pulliam2
Giga Expert

Hi Guys, 

 

A simple way to do that is to specify the view in the URL when redirecting the user to the form. 

Use: 

https://instance.service-now.com/sp?id=form&table=[TABLE]&sys_id=[SYSIDOFRECORD]&view=[VIEWNAME]

Hope that helps!