Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to check user belongs to certain group or not in widget

Ak8977
Tera Expert

I created one widget. In that widget  I need to show some content based on the user group.
if user is a member of one of the following group - xyz, abc, def, jkl. I need to show him some text  else I need to show him another text.

Could someone help me how  I can validate whether the user belongs to one of the group in widget. 
thanks,

2 REPLIES 2

Mark Manders
Mega Patron

Can you share what you already have?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

I am having the following html code
<div>
<!-- your widget template -->
<h1>We apologize for the inconvenience, but this portal has been permanently closed.</h1>
<h2>Please click <a href="/esc">here</a> to access  "Employee Center" portal </h2>
</div>.

I am having the above code.
if the user is from xyz, abc, def, jkl group. I have to show h1 tag in the above code else I need to show h2 tag.