Let’s say you want to add a new column to a task list―one that displays colored icons. The icon color will display differently depending on the Status and Due Date of the task. This could be useful for users to quickly get an indication of tasks that are due soon and tasks that are overdue.
- Create a new field in the list that will be used to display your image. For this example, I’m using the column name of “KPI.”
- If the status value equals “Completed,” show the blue icon.
- If the Due Date is in the past, show the red icon.
- If the Due Date is in within the next seven days, show the yellow icon.
- If the Due Date is beyond seven days from now, show the green icon.
- Set the Target Control Type value to “View.”
- Set the Standalone value to “Override.”
- Set the Target Scope value to the URL of your site (e.g. “/sites/site1”).
- Browse to the List View.
- Select Edit Page.
- Edit the List View Web Part.
After following these steps, the KPI column should show the appropriate icon image based on the due date of the task.