View Formatting In SharePoint

by | MS SharePoint

The View Formatting feature in Sharepoint allows users to customize how items in SharePoint lists and libraries are displayed. In this tutorial, we’ll talk about creating our own formatting views rule to improve the display of views in SharePoint. 

When formatting a view, we can highlight or accent certain rows or columns depending on a certain condition.

View Formatting In SharePoint: Rows

Let’s start with formatting our rows. To do that, click the All Documents.

View Formatting In SharePoint

Then, click Format current view.

View Formatting In SharePoint

We have two options of formatting views for our row. 

1. Alternating Row Styles

The first option is Alternating row styles. This is the common view formatting where odd rows have a different color to the even ones. 

View Formatting In SharePoint

By default, it changes every other row’s color to gray.  

View Formatting In SharePoint

Additionally, we can change the default color of this view by clicking the Edit row styles.

After that, we can set a color that we want for the Odd and Even rows. Just click the color icon across them and choose a color.

View Formatting In SharePoint

View Formatting In Sharepoint Using Conditions

The second option that we can use to format our view is by using conditional formatting. This is where we can set a styling for our rows depending on a certain condition. Let’s now try using it. 

View Formatting In SharePoint

For each conditional formatting, we need an if statement condition and a result. By default, we have one conditional formatting with a condition of “Show all values as”. We also have the result below it, which is setting their background color to gray.

View Formatting In SharePoint

We can create our own conditional formatting view with our own rule by clicking the Add rule button.

View Formatting In SharePoint

It’ll then provide us with an if statement. The first field is for selecting the column that we want to use for this conditional view. For this example, we’ll create a conditional formatting based on the Expense Amount column. 

View Formatting In SharePoint

However, the Expense Amount column is not included on the list here. This is because we’re using a Currency column. This type of column is not yet supported by the Conditional formatting option. 

View Formatting In SharePoint

If you’re using a Currency type column and you want to create and apply Conditional formatting to it, you can convert that column to a Number column instead. 

Changing The Column Type

To change the column type of our columns, just click on its dropdown arrow, click Column settings, and choose Edit

View Formatting In SharePoint

We can then change its column type and select Number.

View Formatting In SharePoint

Though we’re now using a Number column, we can still use a currency sign. For this example, I’ll use the dollar sign. 

View Formatting In SharePoint

Under the More options, make sure that the “Require that this column contains information” option is enabled. This is for forcing all of the files to have an Expense Amount value.

View Formatting In SharePoint

Lastly, click Save.

View Formatting In SharePoint

As we can see, the Expense Amount column still looks the same even though I changed it to a Number column. In case your currency symbol is not showing, just refresh the page.

View Formatting In SharePoint

Conditional Formatting In SharePoint

Let’s now continue with our Conditional formatting view. Again, click the All Documents and click Format current view.

View Formatting In SharePoint

Then click Add rule

View Formatting In SharePoint

Select the column that you want. For this example, we’ll use the Expense Amount column.

View Formatting In SharePoint

The second field is for comparison. For this example, we’ll verify if the amount is greater than 500. So, let’s choose “is greater than”.

View Formatting In SharePoint

The third field is for the value which we’ll set to 500.

View Formatting In SharePoint

We can also add multiple conditions by clicking the Add condition if we want to.

For the result, we can now set a color for the rows that meets our condition above. For this example, I want those rows to have a red color. 

View Formatting In SharePoint

Lastly, don’t forget to click the Save button.

View Formatting In SharePoint

Then, our view will now look like this.

View Formatting In SharePoint

The other rows have a gray color because that’s the default conditional formatting. 

To remove that, just go back to the Conditional formatting option. Click the ellipsis on the right side and click Delete rule.

View Formatting In SharePoint

Don’t forget to save the changes.

View Formatting In SharePoint

The gray background on the other rows are now gone and if we sort our rows by Name, we can now easily see the files with an expense amount of over 500.

2. Adding Multiple Conditions For View Formatting

We can also have multiple different conditions when formatting views in SharePoint. In our example, we currently have a conditional formatting that changes the color of the rows to red if their expense type is over 500. To add another conditional formatting, just click Add rule.

View Formatting In SharePoint

For this example, I created a new rule that changes the row’s color to yellow if its expense amount is between 200 to 499.99

If we want to remove this conditional formatting view, just go back to the Format current view pane, and uncheck the Conditional formatting option. Then click the Save button.

So this is how we can format views for our rows.

View Formatting In SharePoint: Columns

The other type of formatting is column formatting. Just click the dropdown arrow on the column that you want to format. For this example, we’ll format the Expense Amount column again. 

Go to the Column settings and click Format this column

We also have two options for formatting this column. These options actually change depending on the column type. 

For example, if we check the formatting options of the Expense Type, it’ll show three formatting options. 

So, for the Expense Amount column, we have the Data bars option which is useful for columns with numerical values. For this example, we can use it for showing larger and smaller numbers through a graph. By using the Data bars option, we can easily see the file with the highest and lowest expense amount.

Let’s now try the Conditional formatting for columns. 

This has the same options with conditional formatting for our rows. To add a new rule, just click Add rule.

For this example, I want to select the Expense Amount column and look for the rows with a value greater than 500 and make their color red. Don’t forget to save the changes. 

If the changes weren’t applied, just refresh the page.

As a result, we’ll see that only the rows under the Expense Amount column are highlighted or formatted. The other rows are gray because we have the default conditional formatting that changes the color of the other rows to gray.

***** Related Links *****
SharePoint Metadata | An Introduction
Metadata Filtering In SharePoint Files
SharePoint Templates For Document Libraries

Conclusion

To summarize, we’re able to format views on SharePoint. We learned how to apply conditional formatting to both rows and columns.

Keep in mind that we can change the color of the entire row or just the rows under a certain column based on certain conditions. This is another benefit of using SharePoint Online for our document management system rather than using the traditional folder structure in Windows.

All the best,

Henry

Related Posts