Adding Image when no records to show on simple list widget

Community Alums
Not applicable

Hi Team,

 

I have created a Portal, here I have added a Simple list widget which show the list of records. When a new user logs in the widget show as "no records found" is there a possibility to show show kind of image when there are no records

 

Current screenshot

prudhvirajy_0-1745205525285.png

Expected 

prudhvirajy_1-1745205559450.png

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Community Alums 

that message is shown when user possibly doesn't satisfy ACL etc

check the widget code from where it's showing that and add image which is by default hidden but if no records are found then the image will be shown

Add image in this div and enhance

AnkurBawiskar_0-1745206025407.png

 

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

View solution in original post

10 REPLIES 10

@Community Alums 

then it should work fine

Are you testing with admin or non-admin?

I was able to show image from db image

AnkurBawiskar_0-1745214550701.png

 

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

Community Alums
Not applicable

@Ankur Bawiskar 

I'm testing with non-admin user only

@Community Alums 

please close the image tag as well

Also does it work with admin role?

If it works fine for admin then it's access issue

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

Robert H
Mega Sage

Hello @Community Alums ,

 

You can clone the Simple List widget and then add an image to this section of the HTML:

 

RobertH_0-1745214005997.png

 

For example:

 

...
  <div ng-if="!c.data.list.length" class="list-group-item">
     ${No records found}
    <img src="/kb_semantic_check_no_issues_found.svg" />
  </div>
...

 

Then replace the Simple List widget with your copy on the respective page:

 

RobertH_1-1745216440840.png

 

Regards,

Robert

Community Alums
Not applicable

Hi @Robert H , yes I have cloned the widget and trying to add the image but no luck