Hide a list webpart if the list is empty in Modern Pages

Brass Contributor



we have a list with alerts that we want to show on the start page, however if the list has no alerts I want to hide the list web part, any ideas how this can be achieved or any other solution that might be interesting?




3 Replies

@Martin Sagerstrand I would really like to see this to. We are wanting to use Lists for this exact same reason and would not want to resort to a script editor webpart and some JS to deliver.



I need this to. Have you done it with script editor web part as a work around yet?


(Im starting that job now) 

Hello, have you been able to do it? In my page Home i wanted to hide a list if it is empty, but it only contains a single record with an important message.
Regards, David.