- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 11:10 AM
I have a viewport using a page collection that I would like to have a button that bubbles up an event to the main page.
I tried the "bubbling up" method here: https://www.youtube.com/watch?v=PwZLd2phUZQ
But they were using viewports/sub pages so I think what worked there does not work with page collections. How would I go about getting a button to trigger an event on a parent page from a page collection viewport?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 08:19 AM
Hi @IronPotato,
do you know how to perform this miracle?
I am having the same issue as @nwilliam . I managed passing params down to the page collection page using a controller, but my event won't bubble up from the child page (page collection) to the parent page. I had the same issue when creating custom components, but it is possible to fix it by adding the event manually in the "eventMappings" (page definition) of that component. Unfortunately this does not seem to work for Viewport Components with Page Collections.
On the child page I added a dispatch event on the body, that is triggered by a click event on a button:
On the parent page I added the same event in the body's handle event section:
Now calling this handled event like in the above video does not work for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 08:17 AM
@fujan , glad that It worked. I'm on Xanadu so yeah there might be also changes how to do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 12:46 PM
@fujan
Just circling back to this trying to do the same thing with a different viewport. I'm using a "tabs" page collection and I'm not getting this to work after following your fix (I'm able to get it on a normal viewport). In particular step 3...I can see the relay was added to Dispatched events...but I don't see it as its own event mapping to add handlers to (which is what I believe I'm supposed to do in step 3)...any advice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 09:28 AM
What if I do not have "Inherited event handlers" available so that I can not perform point 2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2025 11:40 PM
Hi @_Damian ,
If page is not inheriting events from parent, my guess would be that the page you are on is not direct child of the page where you created the event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 01:18 AM - edited 06-19-2025 01:19 AM
Brad Tilton from ServiceNow has shed some light onto this particular situation:
"Page collection pages use controllers on the parent page to communicate so the only way to communicate from the PC page to the parent page is to call an event handler on the parent page's controller. "
https://www.servicenow.com/community/next-experience-forum/how-to-send-event-from-page-collection-to...