SharePoint conditional formatting using File Size column

Snorkmaiden 1 Reputation point
2022-09-09T14:25:31.523+00:00

Good afternoon,

I would like to be able to use the Format View > Conditional Formatting facility in my SharePoint document library to highlight rows where the file that has been uploaded has a file size of 0kb.

The context is that our users sometimes drag and drop files straight from a compressed folder (zip file), which leads to the appearance of the documents having uploaded - but the filename is all that exists as the file size is 0kb and the file can't be viewed/downloaded/opened.

If the row were to be coloured red when this occurred, it would alert the user that they need to remove the 'corrupted' files, and try uploading them again.

However, when I look at the 'Create rule' command, under If > Choose a column, I can't see the File Size column as an option, even though it is present in the current view. I can only see Modified, Modified By, and Date & Time (in my particular view) - see screenshot. Is there any way I can do conditional formatting that is dependent on the File Size column?

Many thanks.

239529-conditional-formatting-spol-file-size.png

Microsoft 365 and Office SharePoint For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2022-09-12T08:51:04.727+00:00

    @Snorkmaiden

    I can reproduce the issue in my SharePoint document library. By default, File size column is not listed as supported column type in Microsoft documentation: JSON Formatting - Supported column types

    You could make your suggestion to improve use experience in the feedback portal.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.