Configure multiple dynamic page variables for different record types

FredrikT
Tera Guru

I added a dynamic page variable on the Ticket Form page for Change and Incident to match Request to show the record # in breadcrumbs ( Home > INC0012345 instead of Home > Ticket Form). 

If Dynamic page title = %ticketItem and all of the dynamic page variable this appears to only work for one as stated in docs:

https://docs.servicenow.com/bundle/london-servicenow-platform/page/build/service-portal/concept/seo-sp.html

"If more than one dynamic page variables match a variable defined in the Dynamic page title field, the record with the earliest Created date is used."

what is the syntax for adding multiple dynamic page variables?  %ticketItem, %ticketCHG, %ticketINC etc. or is there another way to get this to work?

Thanks!

1 ACCEPTED SOLUTION

Oleksiy Kosenko
Tera Expert

There are no predefined names, you select the name in your Dynamic page title variable definition. In your example you obviously created an entry in [sp_page_title_variable] with the name "%ticketItem" (or it was there OOTB), and since then you can reference this definition by name in your field "Dynamic page title".

(Review the table https://your-instance.service-now.com/sp_page_title_variable_list.do to better understand what I mean).

Create another Dynamic page title variable record, give it another name eg. "%whatever" and use it in your dynamic title hand in hand with the first one:

Dynamic page title = %ticketItem %whatever

Since definitions are bound to a table, you hardly get both variables populated at once. Then one remains empty value and the other gets populated and produces a nice dynamic page title.

 

I even suspect (and let you prove or refute it 😉 ) that two different definitions with the same name "%ticketItem" would allow you keep it simplest:

Dynamic page title = %ticketItem

The value gets populated according to whatever definition (table / sys_id) matches this time.

View solution in original post

3 REPLIES 3

Steve Kelly
Mega Sage

Did you get an answer for this?

I have a similar issue where our KB articles sometimes load with sys_id in the URL (out of box behavior) or sometimes with article=KBxxxxx in the URL (custom). I'd like to create logic to have the title display based on which one is in the URL.

FredrikT
Tera Guru

I have not

Oleksiy Kosenko
Tera Expert

There are no predefined names, you select the name in your Dynamic page title variable definition. In your example you obviously created an entry in [sp_page_title_variable] with the name "%ticketItem" (or it was there OOTB), and since then you can reference this definition by name in your field "Dynamic page title".

(Review the table https://your-instance.service-now.com/sp_page_title_variable_list.do to better understand what I mean).

Create another Dynamic page title variable record, give it another name eg. "%whatever" and use it in your dynamic title hand in hand with the first one:

Dynamic page title = %ticketItem %whatever

Since definitions are bound to a table, you hardly get both variables populated at once. Then one remains empty value and the other gets populated and produces a nice dynamic page title.

 

I even suspect (and let you prove or refute it 😉 ) that two different definitions with the same name "%ticketItem" would allow you keep it simplest:

Dynamic page title = %ticketItem

The value gets populated according to whatever definition (table / sys_id) matches this time.