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

%3CLINGO-SUB%20id%3D%22lingo-sub-2472028%22%20slang%3D%22en-US%22%3EHide%20a%20list%20webpart%20if%20the%20list%20is%20empty%20in%20Modern%20Pages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2472028%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewe%20have%20a%20list%20with%20alerts%20that%20we%20want%20to%20show%20on%20the%20start%20page%2C%20however%20if%20the%20list%20has%20no%20alerts%20I%20want%20to%20hide%20the%20list%20web%20part%2C%20any%20ideas%20how%20this%20can%20be%20achieved%20or%20any%20other%20solution%20that%20might%20be%20interesting%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eregards%3C%2FP%3E%3CP%3EMartin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2472028%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

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

1 Reply

@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.