Hid widget based on location

Suraj_18_18
Tera Contributor

Hi, I want to hide widget if logged in user country is germany. 
Can community will contribute in my post to complete this requiremet.

Thanks

1 ACCEPTED SOLUTION

Cheikh Ahmadou
Tera Guru

You can just activate  user criteria for Service Portal plugin and enable the system property to use user criteria for portal.
Then you will be able to apply user criteria to widget based on location.

View solution in original post

10 REPLIES 10

@Suraj_18_18 

you can use that flag in the widget HTML using ng-if

share the complete widget code

Is that widget a custom one?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Suraj_18_18
Tera Contributor

below is the body of HTML

 

<div>
<!-- your widget template -->
</div>

 

yes. its custom widget.

 

Suraj_18_18_0-1747811204827.png

 

@Suraj_18_18 

there is nothing in HTML?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Cheikh Ahmadou
Tera Guru

You can just activate  user criteria for Service Portal plugin and enable the system property to use user criteria for portal.
Then you will be able to apply user criteria to widget based on location.

Thank you. I really appreciate your support. its working