The CreatorCon Call for Content is officially open! Get started here.

How to pass URL parameters to a service portal homepage?

JennyHu
Tera Guru

Hi there,

I have set up the OOB List & Form (lf) page as the homepage of a service portal.   I would like to pass in the name of the table in the URL param, so that when the service portal homepage loads, it doesn't need to ask the user to enter the table name.   How can this be achieved?

So when users go to https://xxxx.service-now.com/<service-portal>

I'd like to append the URL table param, so it becomes https://xxx.service-now.com/<service-portal>?table=x_mytablename

The end result should be that the table data loads immediately in the left list.

Is there some configuration option on the service portal record to add url params?

Thanks,

Jenny

Message was edited by: Jenny Hu

3 REPLIES 3

chirag_bagdai
ServiceNow Employee
ServiceNow Employee

Hi Jenny,



The easy and simple solution could be add script in your homepage widget where if the URL parameter is missing then consider default value like table = x_mytablename.



or you can redirect user to new URL as per below screenshot :



Screen Shot 2017-06-04 at 11.00.29 PM.png



This validation either you can add with existing widget or you can create new widget and add to your homepage.



My suggestion would be if the URL parameter is missing in that case keep some default value instead of redirecting users to new URL.


Thank you Chirag! Let me give that a try and I will let you know how it goes.


Ankita Bisht1
Giga Contributor

Are you able to achieve this @JennyHu