2016-11-09 5 views
1

...データビューで結合された項目の列にフィルタを適用するにはどうすればよいですか?私はフィルタ]ダイアログボックスを使用してフィルタを生成すると、SPDは、次の行フィルタを生成

<xsl:variable name="Rows" select="/dsQueryResponse/Benefits/Rows/Row[normalize-space(@Benefit_x0020_Type) = $pBenefit and normalize-space(@Level) = $pLevel]"/> 

@ Benefit_x0020_Typeためのフィルタが正常に動作します(これは普通の、非連動、アイテムです)、 @Levelのフィルタは機能しません。次のように@Levelが参加項目で、

<xsl:value-of disable-output-escaping="yes" select="../../../Projects/Rows/Row[@ID=current()/@Project_x003a_ID]/@Level" /> 

がどのように私は入社アイテムのフィルタを動作させることができます...宣言?

答えて

0

私が見つけた解決策は、それが今までのSharePointによってレンダリングされる前に、結合フィールドが含まれるように$行のノードセットを編集した...

<xsl:variable name="Rows" select="/dsQueryResponse/Benefits/Rows/Row"/> 

<xsl:variable name="myRowsFractured"> 
    <xsl:for-each select="$Rows"> 
    <xsl:variable name="projectID" select="@Project_x003a_ID"/> 
    <xsl:variable name="level" select="/dsQueryResponse/Projects/Rows/Row[@ID=$projectID]/@Level"/> 
    <xsl:if test="$level = $pLevel"> 
     <xsl:copy> 
     <xsl:copy-of select="@*|node()"/> 
     <xsl:attribute name="Level"> 
      <xsl:value-of select="$level"/> 
     </xsl:attribute> 
     <xsl:attribute name="Title"> 
      <xsl:value-of select="/dsQueryResponse/Projects/Rows/Row[@ID=$projectID]/@Title"/> 
     </xsl:attribute> 
     </xsl:copy> 
    </xsl:if> 
    </xsl:for-each> 
</xsl:variable> 

<xsl:variable name="myRows" select="msxsl:node-set($myRowsFractured)/*"/> 

($ pLevelは、クエリ文字列から取得される)

その後、$ Rowsの後続の参照を$ myRowsに置き換えます。この手法には、(dvt_RowCountなどの)計算が有効であるという利点があります。

関連する問題