Avatar of DreyTech
DreyTech
Flag for Puerto Rico asked on

Conditional Formatting

I need to know how to code in XSL for SharePoint 2010 (via SharePoint Designer) the following statement for a webpart:

If the created date of an item is older than two days, show alert icon on alert column.
Web Part
The conditional formatting would be something like this:

<td align="center">
            <xsl:attribute name="style">
                        <xsl:if test="ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($thisNode/@Created))) &lt; ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today)))" ddwrt:cf_explicit="1">color: #FF0000;</xsl:if>
            </xsl:attribute>
            <span class="fa fa-exclamation" />
</td>


I have not been able to get this to work. It is a custom webpart with filters already applied to it.
Microsoft SharePointXML

Avatar of undefined
Last Comment
Jamie McAllister

8/22/2022 - Mon
Jamie McAllister

I did something very similar to that here; http://the-north.com/sharepoint/post/Replace-Task-List-Status-Column-with-Icons-in-SharePoint-2010

See if that guidance helps.
DreyTech

ASKER
Hello Jamie! Thank you for the prompt answer, it is helpful, however, this is not what I am looking for.

I need to show the alert icon if a case has been open for more than 2 days. So if for example I were to create a case today (june 11, 2015), the alert icon should pop up two days later (june 13, 2015).

Is there any way to calculate this using xsl so that I can use it on my webpart?
ASKER CERTIFIED SOLUTION
Jamie McAllister

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61