Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

'Color' field in Lists - Sharepoint

Posted on 2011-02-14
13
Medium Priority
?
867 Views
Last Modified: 2012-05-11
Hello,

I am trying to figure out how to add a colored field in a list for Sharepoint. What I mean for this is based on a certain status for a project, I want the field to be filled with a color, like Green for On Schedule, Yellow for Behind, and Red for Immediate Attention.

So, for example:
Project #1 - Location Philly - Status: [GREEN]
Project #2 - Location NY - Status: [RED]

Hopefully this is clear enough.

Thanks for your help everyone.
0
Comment
Question by:ITimaging
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
  • +1
13 Comments
 
LVL 14

Expert Comment

by:KoenVosters
ID: 34892327
You can use jQuery to achieve this:
http://www.codegain.com/codesnippets/sharepoint/developmentprogramming/how-to-apply-color-coding-sharepoint-list-using-jquery.aspx

Add this code in a content editor webpart

If you don't know how to put jQuery on your SharePoint site:
http://weblogs.asp.net/jan/archive/2008/11/20/sharepoint-2007-and-jquery-1.aspx
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 34893625
If you have access to SharePoint Designer, you can also do this using conditional formatting. If you need a "how to", let me know.
0
 
LVL 8

Expert Comment

by:zabiullah
ID: 34894152
In addition to the above references, you can also use calculated column with javascript/JQuery to achieve the same.

Here the references:

http://www.sharepointkings.com/2009/04/sharepoint-calculated-column-and-jquery.html
http://sharepointkb.wordpress.com/2009/04/14/customize-look-and-feel-with-calculated-columns/

Regards,
Zabi
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

by:ITimaging
ID: 34896397
I don't really have access to the server to be able to deploy JQuery to the server, unfortunately, otherwise I'd use it. I do have Sharepoint Designer 2010 for it, though. TEEDA, do you happen to still have a "how-to" for that, please?
0
 
LVL 14

Expert Comment

by:KoenVosters
ID: 34896405
0
 

Author Comment

by:ITimaging
ID: 34897872
I'm having terrible luck with this thing. Okay, so I went through and got the formatting and everything set the one time, but after getting it setup it didn't actually do anything. It didn't change the background of anything in there. Now, I thought it was my mistake since it usually is so I thought I'd start over with it - didn't save the page and re-opened it so it was fresh. Now every time I actually try and open the data view, the list appears and then disappears. I can't click on any of the fields to actually apply a format.
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 34897925
in your page, insert a web part zone if there isn't one there already and click Insert a dataview. Sort and filter as needed.  Select the chevron at the top right of the dataview and choose Conditional Formatting, which will open a task pane. Now select the table cell you want to color and click Create/Apply Formatting in the task pane. Create your condition and click OK. The Modify Style dialog appears, allowing you to set background color, fonts and so on. Good luck.
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 34897958
is it possible that you chose Hide Content instead of Apply Formatting? I've done that once or twice.
0
 

Author Comment

by:ITimaging
ID: 34898041
Sorry, but I did try that TEEDA, as explained in Koen's link. Unfortunately it doesn't actually change the color. It does nothing to be precise.
0
 

Author Comment

by:ITimaging
ID: 34898047
I did check to see if I did, and I didn't. I made sure I made everything visible.
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 34898155
If there are existing entries in your list that meet the conditions, then I'm mystified as to why the formatting isn't being applied.  But just in case, click the Set Visibility button in the task pane and click All Formatting Visible.
0
 

Author Comment

by:ITimaging
ID: 34898525
I'm baffled myself. I don't know why it's not filling it the proper colors, and I set it up so the condition is correct. I did set it for All Formatting Visible too. It's odd.
0
 
LVL 4

Accepted Solution

by:
TEEDA earned 2000 total points
ID: 34898595
It sure is.  Data views can be finicky, so I'd start a brand new page and make sure your web part is within a web part zone and that it's the only web part on the page.  Good luck!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question