How to pass variables via URL into pages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2013 09:57 AM
Hi,
I'm creating a separate knowledge base in our Service-Now instance in order to better suit our needs.
I'd like to be able to display a list of knowledge articles, and when the user clicks on an article, have it pass that article's ID to a new page in our 'site' which will display the article and any related case studies.
To display the article, I am using a Dynamic Content block inserted into a page. I want to be able to pass in a variable through the URL in order to choose which article to display.
This is how the KB View page normally does it.
kb_view.do?sys_kb_id=[id] where the id in brackets is the id of the article.
I've copied the code from the kb_view UI Page into the Dynamic Content block that I created and made sure 2-phase was checked. I want to know, how should I pass in the ID of an article to make it view in a Dynamic Content block embedded into a page?
Thanks in advance for your help.
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 06:26 PM
check out the RP object:
RP.getParameterValue(parameterName) - returns the value of the specified parameter passed on the URL
RP.getParameters() - returns the parameters passed on the URL
http://wiki.servicenow.com/index.php?title=Extensions_to_Jelly_Syntax#RP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2013 01:39 PM
Thank you for the reply. I found that this works for me more consistently than the sysparm variable.