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 166 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

Creating Users and Managing Passwords in Microsoft Office 365

0 721 3

In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365.   For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365    

Subnetting a TCP/IP Network using the Magic Box Method

0 1847 5

See our class schedule for complete Course Schedule Training. Classes are held in Phoenix, AZ and can be attended online from anywhere in the world with RemoteLive™. Instructor: Rick Trader  Video Transcription: One of the things that we might have to do in our corporate network is to take a class of IP addresses and then subnet that into … Continue reading Subnetting a TCP/IP Network using the Magic Box Method

Write a Comment

See what people are saying...

    Share your thoughts...

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