- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 07:14 AM
Hi,
I'm trying to figure out how to change the depicted tab title from the default "Loading…" to a dynamically generated text that is known just after a data resource on the page has been loaded.
My contacts at ServiceNow believe there must an event that can be emitted to change the title so I assume I must call something like this to set it:
api.emit("NOW_UXF_PAGE#AN_EVENT_NAME", "My new title")
However, I couldn't find the list of available events anywhere.
Has anyone come across this issue? Did you find anything in the documentation? Our users would like to see a meaningful text in the title.
Thank you,
Martin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 08:17 AM
In my case, this only changes the browser title, not the workspace tab title:
However, your idea made me explore the API a bit further and finally I found this to work (almost) as expected:
helpers.screen.updateStatus({title: "My new title"});
This will set both the title of the browser and of the workspace to "My new title".
However, it doesn't work after you do a Link to destination if your target route is "current". (because it creates some kind of a subroute). But that's a different issue.
Thanks once again, this at least answers the original question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 08:41 AM
Hi Martin,
I remember to come across this issue as well. You can try the following solution which might work for you or at least give you a direction. I have created Row Clicked event on my list, where I have specifically selected Link to destination event, which is redirecting me to this Testing page.
As you can see the tab Title is set to Loading...
The reason for this is the Title field in Link to destination event is not set, as you can see in the below image.
After specifying either the hardcoded or dynamic value via binding, it will be resolved. Make sure to Apply and save. See the below images for reference.
Hopefully, this will resolve your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 12:02 PM
Hi Muhammad,
thank you a lot for posting this. I have found this option - but that still requires me to know the title value before the page is loaded. This could work when navigating from a list, but the user might as well just paste the URL from clipboard or open it in another way.
Your workaround would certainly cover some cases but it's not a proper solution (imho).
Thanks anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 06:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 08:17 AM
In my case, this only changes the browser title, not the workspace tab title:
However, your idea made me explore the API a bit further and finally I found this to work (almost) as expected:
helpers.screen.updateStatus({title: "My new title"});
This will set both the title of the browser and of the workspace to "My new title".
However, it doesn't work after you do a Link to destination if your target route is "current". (because it creates some kind of a subroute). But that's a different issue.
Thanks once again, this at least answers the original question.