Show Widget even when Empty

zachbarr
Mega Contributor

Hi all,

See below. I want to have the "My Open Requests" to show even when there is no Open Requests as shown with the "My Open Incidents".  

Can someone show me in the right direction of where this is set?

find_real_file.png

find_real_file.png

7 REPLIES 7

Jaspal Singh
Mega Patron
Mega Patron

Hi Zachary,



All you need to do is to locate the page Service Portal >> Page >> Page_name



Open it in designer view.


Once done click on the top end corner of widget that has pencil sign


On clicking you get a form as below:


find_real_file.png



Check the marked checkbox & you are done.


zachbarr
Mega Contributor

Hi Jaspal,



This is what i get when i click on the pencil icon.



find_real_file.png


That only shows up for data table as Instance of Simple list.


find_real_file.png



All you need to do in your case is to clone the widget My Requests by use of button. Once done scroll down & change data table to Instacne of Simple list from Instance.



Then open the page in designer. Drag the cloned widget to the page remove the OOB one for My Requests & & then click on pencil icon & you will find the show even empty option available.


"Show even when empty" checkbox does NOT show up OOB/By Default/Automatically. We have to configure 'Widget Options schema' with a Boolean type variable and then use this variable in the angular template.

This is how you can configure Widget Options schema to get the checkbox "Show even when empty":

find_real_file.png

find_real_file.png

 

After saving the widget options schema you will get the checkbox "Show even when Empty". 🙂

 

Don't forget to use this variable in your html code: example -> ng-if="c.data.isValid && (c.options.always_show || c.data.filterText || c.data.list.length)">

 

 

 

Note: It works for Instance and Instance of simple list as well. Hope it helped! : )