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

A Simple Introduction to Cisco CML2

0 3877 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

Creating Dynamic DNS in Network Environments

0 641 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader teaches how to create Dynamic DNS zones in Network Environments. Video Transcription: Now that we’ve installed DNS, we’ve created our DNS zones, the next step is now, how do we produce those … Continue reading Creating Dynamic DNS in Network Environments

Cable Testers and How to Use them in Network Environments

0 724 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments

Write a Comment

See what people are saying...

    Share your thoughts...

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