How to configure Conditional Formatting in SharePoint Designer

Home > Blogs > SharePoint > How to configure Conditional Formatting in SharePoint Designer

How to configure Conditional Formatting in SharePoint Designer

Like This Blog 2 Spike Xavier
Added by September 16, 2013

One of the best ways to enhance the user experience is to highlight something about the data they are interacting with. One of the coolest tools available out-of-the-box with SharePoint is Conditional Formatting. With Conditional Formatting, you can designate some condition that the data is in and based on the matching the data values to that rule set. Then you can have SharePoint Style the data in a particular way to have it stand out from the other data on the page.

In this blog, I will take a list of products and using conditional formatting, I will format those products which are under $10 to style the retail price column of those items in a larger font which will be bold and red in color.

To do this, I have created a new Site Collection with the top level site based on the Team Site template (STS#0). I have created a list template with some products inside of it. The list has 3 list columns, the out-of-the-box title column which I changed to sku, ProductDescription is multi lines of text and retailPrice which is currency. I based the list on the Custom List Template. I added some products to the list before saving it as a template with a variety of prices including a few that are below $10.

Here are the steps I will go through in the blog:

  1. Create a list based on my custom template
  2. Open SharePoint Designer
  3. Create a new aspx page called ProductsPage.aspx
  4. Connect the page to the V4.master page.
  5. Create custom content inside the contentPlaceHolderMain
  6. Insert a Data View of the Products List
  7. Add Conditional Formatting to the Web Part
  8. Set the ProductsPage.aspx as the home page of my site.
  9. Add a filter to only show the products under $10
  10. Customize the Sorting of the remaining items to be Ascending
  11. Adjust the visible columns to just show the ProductDescription and RetailPrice.
Create a list based on my custom template 

Create-a-list-based-on-my-custom-template.png
Create a list based on my custom template – Filter 

Create-a-list-based-on-my-custom-template-filter.png
Create a list based on my custom template – Select template 

Create-a-list-based-on-my-custom-template-select-template.png
Create a list based on my custom template validate results 

Create-a-list-based-on-my-custom-template-validate-result.png
Open SharePoint Designer 

Open-SharePoint-Designer.png
Create a new ASPX page called ProductsPage[dot]aspx 

Create-a-new-aspx-page-called-ProductsPage_dot_aspx.png
Create a new ASPX page called ProductsPage[dot]aspx – Select ASPX 

Create-a-new-aspx-page-called-ProductsPage_dot_aspx-selec.png
Create a new ASPX page called ProductsPage[dot]aspx – Name the page 

Create-a-new-aspx-page-called-ProductsPage_dot_aspx-name-.png
Create a new ASPX page called ProductsPage[dot]aspx – Answer Warning 

Create-a-new-aspx-page-called-ProductsPage_dot_aspx-answe.png
Create a new ASPX page called ProductsPage[dot]aspx – Delete form tag 

Create-a-new-aspx-page-called-ProductsPage_dot_aspx-delet.png
Connect the page to the V4[dot]Master Page 

Connect-the-page-to-the-V4_dot_master-page.png
Create custom content inside the contentPlaceHolderMain 

Create-custom-content-inside-te-contentPlaceHolderMain.png
Create custom content inside the contentPlaceHolderMain – Place the cursor 

Create-custom-content-inside-te-contentPlaceHolderMain-pl.png
Insert a Data View of the Products List 

Insert-a-Data-View-of-the-Products-List.png
Insert a Data View of the Products List – Save 

Insert-a-Data-View-of-the-Products-List-save.png
Add Conditional Formatting to the Web Part 

Add-Conditional-Formatting-to-the-Web-Part.png
Add Conditional Formatting to the Web Part – Select column 

Add-Conditional-Formatting-to-the-Web-Part-select-column.png
Add Conditional Formatting to the Web Part – Using the ribbon format column 

Add-Conditional-Formatting-to-the-Web-Part-using-the-ribb.png
Add Conditional Formatting to the Web Part – Set the field name 

Add-Conditional-Formatting-to-the-Web-Part-set-the-field-.png
Add Conditional Formatting to the Web Part – Set the comparison 

Add-Conditional-Formatting-to-the-Web-Part-set-the-compar.png
Add Conditional Formatting to the Web Part – Set the value 

Add-Conditional-Formatting-to-the-Web-Part-set-the-value.png
Add Conditional Formatting to the Web Part – Check the task pane 

Add-Conditional-Formatting-to-the-Web-Part-check-the-task.png
Add Conditional Formatting to the Web Part – Validate settings 

Add-Conditional-Formatting-to-the-Web-Part-validate-setti.png
Add Conditional Formatting to the Web Part – Set the styles 

Add-Conditional-Formatting-to-the-Web-Part-set-the-styles.png
Add Conditional Formatting to the Web Part – Save work 

Add-Conditional-Formatting-to-the-Web-Part-save-work.png
Set the ProductsPage[dot]aspx as the home page of my site 

Set-the-ProductsPage_dot_aspx-as-the-home-page-of-my-site.png
Set the ProductsPage[dot]aspx as the home page of my site – Using the ribbon 

Set-the-ProductsPage_dot_aspx-as-the-home-page-of-my-si_1.png
et the ProductsPage[dot]aspx as the home page of my site – Preview in browser 

Set-the-ProductsPage_dot_aspx-as-the-home-page-of-my-si_2.png
et the ProductsPage[dot]aspx as the home page of my site – Save any changes 

Set-the-ProductsPage_dot_aspx-as-the-home-page-of-my-si_3.png
et the ProductsPage[dot]aspx as the home page of my site – Validate results in browser 

Set-the-ProductsPage_dot_aspx-as-the-home-page-of-my-si_4.png
Add a filter to only show the products under $10 

Add-a-filter-to-only-show-the-products-under-_10.png
Add a filter to only show the products under $10 – set the values 

Add-a-filter-to-only-show-the-products-under-_10-set-the.png
Add a filter to only show the products under $10 – Validate the results 

Add-a-filter-to-only-show-the-products-under-_10-validate.png
Customize the sorting of the remaining items to be Ascending 

Customize-the-Sorting-of-the-remaining-items-to-be-Ascen.png
Customize the sorting of the remaining items to be Ascending – Add retail price 

Customize-the-Sorting-of-the-remaining-items-to-be-Asc_1.png
Adjust the visible columns to just show the ProductDescription and RetailPrice 

Adjust-the-visible-columns-to-just-show-the-ProductDescri.png
Adjust the visible columns to just show the ProductDescription and RetailPrice remove unwanted fields 

Adjust-the-visible-columns-to-just-show-the-ProductDesc_1.png
Adjust the visible columns to just show the ProductDescription and RetailPrice – Validate settings 

Adjust-the-visible-columns-to-just-show-the-ProductDesc_2.png
Adjust the visible columns to just show the ProductDescription and RetailPrice – Validate results 

Adjust-the-visible-columns-to-just-show-the-ProductDesc_3.png


Spike Xavier
SharePoint Instructor – Interface Technical Training
Phoenix, AZ

Videos You May Like

Agile Methodology in Project Management

0 153 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

Using Navigation Controls in a Collaboration Site in SharePoint

0 337 1

In this SharePoint training video, I want to talk about the Navigation Controls in SharePoint. They tend to fall into two kind of different categories; one with the navigation controls in a typical Collaboration Site such as a Team Site or a Project Site. These are Sites that are based on the Team Site Template … Continue reading Using Navigation Controls in a Collaboration Site in SharePoint

Detailed Forensic Investigation of Malware Infections – April 21, 2015

4 608 5

How does an investigator hunt down and identify unknown malware? In this recording of our IT Security training webinar on April 21, 2015, Security expert Mike Danseglio (CISSP / CEH) performed several malware investigations on infected computers and identify symptoms, find root cause, and follow the leads to determine what’s happening. He demonstrated his preferred … Continue reading Detailed Forensic Investigation of Malware Infections – April 21, 2015

Write a Comment

See what people are saying...

  1. Avatar Darren Ferguson

    Yes please update for SPD 2013 as this doesn’t have the conditional formatting menu

  2. Avatar bob elander

    Well done, please update for SPD 2013.

Share your thoughts...

Please fill out the comment form below to post a reply.