Show users list in portal with search option

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 09:37 PM
Hi Team ,
We have a requirement to show list of users (changes based on logged in user profile) in portal and allow users to search within the list. We also would like to redirect to user profile when they click any user record on the list.
Do we have any OOB widget we can take reference from ?
Any input on this would be much appreciated.
Thanks,
Fedrick

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 09:46 PM
Hi,
As per my knowledge there is no OOB widget for such functionality.
You can build custom widget to achieve your requirement. Where exactly you want this feature? On any form or in a Portal page using custom widget?
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 10:08 PM
Hi,
There is no such OOB widget.
You need to create a custom widget for the same.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 10:24 PM
Hi Feddy,
You can refer below code, but you might need to make some changes in it.
html:
<div class="container">
<h1>
User's List:
</h1>
<table border= "1.5px solid black">
<tr>
<th>User ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
</tr>
<tr ng-repeat="x in data.list">
<th>{{x.id}}</th>
<th>{{x.fname}}</th>
<th>{{x.lname}}</th>
<th>{{x.email}}</th>
</tr>
</table>
</div>
server:
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
var gr= new GlideRecord('sys_user');
gr.addNotNullQuery('user_id');
gr.query();
var id, fname, lname, email;
data.list=[];
while(gr.next()){
var out={};
out.id=gr.getValue('user_name');
out.fname=gr.getValue('first_name');
out.lname=gr.getValue('last_name');
out.email=gr.getValue('email');
data.list.push(out);
}
})();
If its helpful to solve your requirement please mark helpful.
Thank you
Gaurav Rotke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2022 01:16 AM