Forum Discussion
List View Formatting - Conditional Message when there are no items?
- Sep 25, 2020Hello,
Perhaps this could be solved with a Power Portal? Using a Power App to control and display content. Power Automate to create triggers and desired actions.
Tip: Listen to the recent episode of the Intrazone podcast. Omar Shahine has built a similar solution.
- jpittman_mygnNov 09, 2021Copper Contributor
cprothero
Little late to the party but I found the following CSS that you can use if you're using a tool like the Modern Script Editor web part. Have done this a few places in our tenant where we can't afford to wait for Microsoft to give us cleaner UI options 😅<style> div[data-automationid='emptyFolderContainer']{display:none !important}; </style>
Fun note, this is the only place so far that I've seen "data-automationid" listed in the HTML instead of "data-automation-id". We can probably expect this CSS hack to break just as soon as somebody on the SharePoint dev teams realizes they missed a "-" in their code 😜- Zonar_MingNov 18, 2021Copper Contributor
jpittman_mygn Can it be done on a modern site page? If it can, can you provide more details how to add a modern script editor web part on a modern site page? I do not find this option on the listed web part. It will be nice to hide that silly message. Thank you.
- jpittman_mygnNov 18, 2021Copper Contributor
Yep! Works on modern, although isn't exactly straightforward to get it set up as you need to install a custom webpart that isn't provided out of the box.
The "Modern Script Editor" webpart that I'm referring to is a part of the SharePoint PnP SPFX webpart samples provided by Microsoft for webpart development demonstration. You can find the source code here: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor
At the very bottom of that page there are some links to issues/discussions which should hopefully point you on the install process.
- cprotheroNov 10, 2021Iron ContributorThanks for following up. That's a good tip to know.