Viewport rendered correctly in UI Builder but not on the preview page

Khang Tran
Tera Contributor

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:

KhangTran_0-1692149352395.png

 

Viewport does not render in preview page:

KhangTran_1-1692149465905.png

 

If I hard coded the sys_id in the page's property, the viewport rendered correctly in both UI Builder and preview page:

KhangTran_2-1692149768866.png

 

Hope that makes sense and I appreciate any guidance.

 

 

1 REPLY 1

sasi_v
Tera Guru

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