Viewport rendered correctly in UI Builder but not on the preview page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2023 06:37 PM - edited 08-15-2023 07:24 PM
Hello, I'm configured a Record (parent) page where I've added a viewport (child) to display data from another related table.
I've followed Brad Tilton's guide here (https://www.servicenow.com/community/now-platform-forum/how-do-viewport-tab-communicate-with-each-ot... to pass data (a sys_id of the parent record) using page's properties from parent page to the child page (ie. the viewport). The viewport uses that sys_id to query another table and display a page (in this case a photo field) of that table.
If the page property is set to use @context.props.sysId (which is the sys_id of the parent record), the viewport renders correctly in UI Builder (see below screenshot), however the view port does not render in the preview page.
Viewport rendered correctly in UI Builder:
Viewport does not render in preview page:
If I hard coded the sys_id in the page's property, the viewport rendered correctly in both UI Builder and preview page:
Hope that makes sense and I appreciate any guidance.
- Labels:
-
UI Framework Next Experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2024 07:00 AM
Hi @Khang Tran ,
Have you defined the sysid property on the subpage (child)? If not, you need to define it and bind it.
Although this is an old post, I'm posting my views here as I don't see any responses.
Regards,
Sasikanth