2012-03-23 53 views
0

任何人都可以基於日期獲得條件格式的工作嗎?SharePoint 2010和高級條件格式

我想將格式應用於7天前創建的列表項目。

我已經用盡了我的Google搜索,但沒有任何結果。這是其他人使用的表達方式。但它不適合我。

number(translate(substring-before(@Created,'T'),'-','')+7) >= 
    number(translate(substring-before($Today,'T'),'-','')) 

回答

1

我覺得你想找的XSL模板匹配;

<xsl:variable name="dateTime" select="ddwrt:FormatDate(string(@Created), 1033, 3)" /> 
<xsl:variable name="dateTimeCondensed" select="ddwrt:FormatDate(string(@Created), 1033, 2)" /> 
<xsl:variable name="date" select="substring-before(substring-after($dateTime, ', '), ', ')" /> 
<xsl:variable name="month" select="substring-before($date, ' ')" /> 
<xsl:variable name="day" select="substring-after($date, ' ')" /> 
<xsl:variable name="time" select="substring-after($dateTimeCondensed, ' ')" /> 

在SharePoint設計公式域,創建條件格式計算公式,併爲超過7天前創建的,應當註明的列表項關聯這一點;

=創建= + 7

基本上你說的「計算列」和條件格式是基於XSL轉換,因爲我的XSL的列表:變量描述。您可能不會手動編輯XSL模板,但您可能會再次像上面示例中描述的那樣顯示爲XSLT。

SharePoint Designer 2010可以添加計算列和formats are described on MSDN以供參考。

希望這有些幫助! :)