cancel
Showing results for 
Search instead for 
Did you mean: 

Custom No Result message

harikm007
13 - Data Warehouse
13 - Data Warehouse

Below script will allow you to change default 'No Result' message to any message you want. It is possible to apply different messages to each widget.

Refer: https://www.binextlevel.com/post/custom-no-result-message

harikm007_0-1662398549458.png

widget.on('domready', function(se){
	
	no_result_message = 'No sales data available'
	no_result_url = 'https://thumbs.dreamstime.com/z/no-found-symbol-unsuccessful-search-vecotr-upset-magnifying-glass-cute-not-zoom-icon-suitable-results-oops-page-failure-122786031.jpg'
	
	if(se.$noResults)
	{		
		if (prism.activeWidget == null)
			no_result_container = $(`widget[widgetid="${se.oid}"]`)
		else
			no_result_container = $('.prism-widget-preview')
		
		if(no_result_message.length > 0)
		{
			$(no_result_container).find('.widget-no-result-overlay .widget-no-result-notify-holder .no-result-title').text(no_result_message)
		}
			
		if(no_result_url.length > 0)
		{
			$(no_result_container).find('.widget-no-result-overlay .widget-no-result-notify-holder .image').attr('src', no_result_url)
			$(no_result_container).find('.widget-no-result-overlay .widget-no-result-notify-holder .image').css('width', 'auto')
		}
	}
})

-Hari

 

 

1 REPLY 1

MikeGre
7 - Data Storage
7 - Data Storage

Very nice idea! 

Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Need additional support?:

Community Support Request