in MRVS I need add Loading (gif) while Clientscript calls Ajax

alexgg57
Tera Expert

In ServiceNow catalog portal, when a SelectBox field has some dependencies, I wish to show a loading widget/banner/or something to wait/block UI until all form fields are populated.

I do use such method successfully within a catalogitems that does not have MRVS.

Here is how: https://community.servicenow.com/community?id=community_article&sys_id=1cabf097db9b5c14b1b102d5ca961...

 

However, I cannot implement that in item with MRVS case...

 

Any ideas of how to achieve such scenario if it's possible?

 

Thanks,

Alex.

 

4 REPLIES 4

alexgg57
Tera Expert

Just re-sending the same question - still need to know if it's possible?

 

In ServiceNow catalog portal, when a SelectBox field has some dependencies, I wish to show a loading widget/banner/or something to wait/block UI until all form fields are populated.

I do use such method successfully within a catalogitems that does not have MRVS.

Here is how: https://community.servicenow.com/community?id=community_article&sys_id=1cabf097db9b5c14b1b102d5ca961...

 

However, I cannot implement that in item with MRVS case...

That community article you linked to has been archived so IDK what it said.  What I've done in the past is add a rich text variable that uses a spinner gif.  Hide the variable when the form loads and show it when the Ajax call starts.  And hide it again when the Ajax call is finished.  Maybe that's what that article talked about ??  Or maybe not.  

What does the MRV have to do with it, though?  Do you want to show the spinner inside the MRV?

alexgg57
Tera Expert

Yes, I need to show it on MRV page b/c there are some fields reading data via API from third parties, so need to show the loading.
I will need to check if MRV supports a rich text... If yes it should works - thanks

gconway
Tera Contributor

There is an OOB loading screen within the MRVS 

gconway_0-1730732044699.png

gconway_1-1730732110927.png

I was able to trigger this through the console using "Log to console: $scope.data" and finding the fields where the MRVS is listed and changing the value _loadingData to true. However I don't know how to trigger this through client scripts. Maybe someone can provide a hint?