User criteria in Service Portal is cached ?

Ximizu
Mega Guru

On a widget instance, I would like to apply a user criteria as described in the documentation.

https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/build/service-portal/task/widge...

 

The user criteria is advanced and it would return true if the user have active requests and false if the user has no active active requests.

find_real_file.png

The issue I'm facing, is that the first time the widget instance is displayed on the service portal, the user criteria is correctly evaluated e.g. the widget instance is not displayed if the user has no active requests. But then the user create a request, the widget instance should be displayed, but it is not. But after some times, the widget instance displays.

Same issue the other way : if the user has active requests, the widget instance is correctly displayed, but then, all his active requests are closed, the widget instance should not be displayed, but still be. But after some times, the widget instance is hidden.

 

It sounds like the user criteria result is cached. But in this exemple, it is not good for the user experience.

Has you face this issue? If yes, was you able to resolve it and how ?

7 REPLIES 7

Thanks Hardshvardhan, I have looked carefully at the link, tried some tests, but din't found out exactly how to clear the cache of the user criteria in Service Portal.

Do you know how to proceed exactly?

 

amaury
Tera Guru

Hi Xim, 

I see that you are using user criteria to Show/Hide an instance widget which is great but an issue may be link to the conditions according to what you need.

The conditions refer to a glideRecord searching for active and opened by "me" records on a list which I think doesn't working well for dynamic changes.

I would typically code a condition to show or hide into the widget itself for that kind of advanced requirement.

Cheers,

 

John Diaz
Kilo Guru

Ximizu,

Did you ever figure this out? After a week of very frustrating troubleshooting, I believe this is the root cause for my issue as well.