Change view when selecting from a dropdown on a form

William Busby
Tera Guru

I have a form in a scoped custom app in which I need to select a value from [cmdb_ci_site] which is in the CMDB CI Class Models application. The default view does not contain the data needed so I created a custom view in my scoped app. Unfortunately, when using the form and selecting the magnifying glass to lookup values in [cmdb_ci_site] there is no method offered to switch to my custom view. I tried going down the path of creating a view rule (within my scoped app) but you can't create a view rule on a table outside of your current scope. Any insight on options?

I'd like to avoid modifying the default view in CMDB CI Class Models for the table [cmdb_ci_site] to avoid having to deploy both applications (mine and CMDB CI Class Models) but if that's the only option I'd like to know.

 

Showing No Option to Select View.png

5 REPLIES 5

Scott_Groth_BAH
Tera Contributor

This post references creating a "sys_popup" view.  The reference popup window will use this view if it exists.

https://www.servicenow.com/community/developer-forum/how-do-i-configure-a-pop-up-view-on-a-reference...

Actually, this might work better.  My initial suggestion won't work because your view will be prepended with the application scope.

This article shows how to edit the columns that are shown in the popup window without the view.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0686318

Todd W_
Tera Contributor

You can force a view using the link in the navigator module.  Add this to the end of the link: &sysparm_view=Major+incidents&sysparm_view_forced=true.  Substitute your own view name.

Thx for the reply Todd. I knew about the option you mention but I have no way to inject the URL header that's called by selecting the magnifying glass. If you know of a way please chime in!