UI Builder - fetch sysId's from selected records and put it in modal servicenow ui builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2026 04:42 AM
Hi all,
I have a question regarding the list component.
Is there a way to fetch the sys id's of the records selected in the list component and pass them to a viewport modal?
I’ve attached the modal screenshot and the list screenshot for reference. I would like to populate the selected record names inside the modal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2026 05:04 AM
unfortunately as of now I don't remember having any events that is exposed and contains the sysId's. (but you can still check all the event handlers). As a workaround I usually use a repeater for this with a selectbox component. The selectbox event contains the sysId of the selected object and you can work with that.
Regards,
**Martin Virag**
ServiceNow MVP 2026
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2026 05:56 AM - edited 05-21-2026 05:59 AM
I have created a page collection to display a viewport modal on the record page. Now, based on the guide me on where exactly I should use a repeater?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2026 05:22 AM
1. https://www.servicenow.com/community/developer-forum/ui-builder-list-component-fetch-sysid-s-from-se... Refer this solution to get the selected list records
2.create a client state parameter to store the selected list records, then configure the client state parameter with the step 1 event payload
3. https://www.servicenow.com/docs/r/zurich/application-development/ui-builder/add-viewport-modal.html
Hope it helps