kobby_adu-nti
ServiceNow Employee

The sys_pop view is widely used, but little thought of feature in the ServiceNow platform. I would compare it to the music in a movie. When done right film music enriches your movie experience but you hardly notice it, when it is done wrong, or when it is not there at all, all of a sudden you are aware that something is off.

In the frameset user interface of ServiceNow, on a form where a reference field is present depending on whether or not the field is not configured to be readOnly, there will be a reference pop-up icon on the field. Note that reference pop-ups and clickthroughs are hidden by default if a Client Script, UI Policy or ACL makes the field read-only.

On a base system instance, there are several default sys_popup view records that are configured to only display with specific views OOB. Try opening the following URL on your instance:

https://<yourInstanceName>.service-now.com/sys_ui_view_list.do?sysparm_query=nameLIKEsys_popup

The URL above will query the sys_ui_view table. Reference icon sys_popup view can be identified in the listed records following naming convention below:

                  Name: sys_popup,<viewName>

Example of sys_pop view in action in the frameset

The sys_popup views typically display a limited version of the default view of a table. a ServiceNow administrator can configure the sys_popup view displayed when an end user creates an onMouseOver event on a reference icon in a couple of ways.

For example take a base system instance and navigate to the incident table, there you will find we have a view named "portal". Therefore if you wanted to create a unique sys_popup for the portal view you would name it sys_popup, portal

You can create your own view record following the convention above. Or configure the form layout of default sys_ui_view sys_popup records that are pre-existing in your instance. For instructions on the best ways to achieve this please review articles linked to below.

http://wiki.servicenow.com/index.php?title=Customizing_the_Reference_Icon#gsc.tab=0

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/administer/field_administration/c...

So how does this affect the Service Portal?

Now to the point of this article, the Service Portal does away with all of this. Early in the design process of the Service Portal, a decision was taken to display the complete form in the modal popup when an onClick event occurs on a reference icon (Note: In the Service Portal there is a requirement to click on the icon rather than hover over it). Instead in the Service Portal, we display either the current, inherited view (if it exists), or you will see the Default view for the displaying the records for a given table.

Example of the sys_pop view in the Service Portal

17 Comments
paulmorris
Giga Sage

I'm confused by this.



For example, the User Table has a view called 'Service Portal'.



Yet, when an end user clicks on the reference icon for a user record within the Service Portal, the Default view is shown.


There appears to be no way to change what view is shown here.



Is this expected?


kobby_adu-nti
ServiceNow Employee

Unfortunately, yes it is the case that this is expected behaviour. The Service Portal can only display the current inherited view. When one is not found the default view is displayed in the sys_popup modal


paulmorris
Giga Sage

We are finding that customers do not expect back-end type access in a front end portal.


It would be great for some control to be added in future.


kobby_adu-nti
ServiceNow Employee

Thank you for the feedback Paul, I will pass this on to our product management team.


Bruno De Graeve
ServiceNow Employee

hello Kobby,



We definitly need to improve this behavior. We need to be able to control the content per table that will be displayed, as well easily manage the ACL. As an itil user I get a read only form, as an admin an editable form (might be useful but why not having it read only as well) an as must end users using the Service Portal, they have no role and the current ACLs prevent to show any data. In that case you get such a popup:



find_real_file.png


I doubt our customers are waiting for that. Maybe something to improve in one of our next releases.


Thanks, Bruno


marcloding
Kilo Expert

Hi,

Is there any work around for this? Thanks

Andre Kosak
Tera Contributor

Reference fields are being rendered with the angular directive <sp-reference-field>, which is using the formModel.view value as a value for defining the view for popup. This directive is typically used inside of <sp-model> directive. There is no OOTB widget where you would find an example of defining the view, but you could pass the value from the parent widget where <sp-model> (and<sp-reference-field> inside of it) is being used.

Example: in widget "SC Catalog Item" or its clone add following statement after "data.sc_cat_item = $sp.getCatalogItem(catItemData);"

data.sc_cat_item.view = 'ess';

This should make all reference fields on Catalog Items to use "ess" View.

Jay25
Kilo Contributor

when an end user clicks on the reference icon for a user record within the Service Portal, the Default view is shown. any workaround for this. am also facing same issue?

G24
Kilo Sage

Hello.  I see that at least 5 people marked this comment as Helpful.

Are you saying that there is a fairly straightforward way to make all Catalog Items use, for all reference fields, a view called "ess", if it is defined??

I'm very weak on Portal development, and widgets.  Is this something that can be done without a ton of Angular / Portal / Widget knowledge?  And if so, could you (or someone) please provide some more details on how to implement this change step by step?

G24
Kilo Sage

> Early in the design process of the Service Portal, a decision was taken to display the complete form in the modal popup when an onClick event occurs on a reference icon...

1)  WHY???  Why would you not allow the same flexibility that is possible with the Platform UI?  Isn't the Portal supposed to be MORE customizable than the Platform UI?


> Instead in the Service Portal, we display either the current, inherited view (if it exists), or you will see the Default view for the displaying the records for a given table.

2)  What is mean by the "inherited view"?
3)  On the Portal, how do you tell what view is active?  (I don't see any view info in the URL.)
4)  Does the Service Catalog have a "View" concept?  (That is where I want a different form shown for my Reference Field.)

Thank you very much to anyone who can enlighten me.