Forum Discussion

Martin Sagerstrand's avatar
Martin Sagerstrand
Brass Contributor
Jun 22, 2021

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

Hi,

 

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?

 

regards

Martin

  • mattperry3000's avatar
    mattperry3000
    Copper Contributor

    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.

  • Davidllem's avatar
    Davidllem
    Copper Contributor
    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.
    Thanks.
    Regards, David.

Resources