Tuesday, September 24, 2013

SharePoint 2010 List color codes indiacator using HTML calculated columns

Hi guys,

I have the requirement to build the dashboard designer based on the data from the list. After research on the google, I am able to find the simple way to achieve it using html calculated columns.

Below is the brief description about it for reference.

For example, you have the choice field to show the field "Kickoff" status to green for in progress, red for delay and yellow for hold on.

I created the calculated column to name it as "KICKOFF" and wrote the calculated formula as follows.

KICKOFF: ="
"

Once the user selects the Kickoff field to green from choice dropdown, the dashboard field will be updated with green bullet.

Similarly for other fields, you can write the html calculated fields easily based on the choice specified in the original field.

PRESENT: ="
"

In above one ,if the choice field "Final presentation" selected by user is Red, the calculated field show red bullet in dash board.

Once you insert the list view webpart in the page, modify the view of list to display the calculated fields .

After that , your job is not completely done.  You have to modify the columns value in sharepoint designer.

Open the list view webpart in designer and select the calculated field, then go to properties and then write

xsl:value-of disable-output-escaping="yes"

Save and close the page. Refresh the page in webpage and see the color dashboard.

No comments: