Comments on: Unlocking the Mysteries of Data View Web Part XSL Tags – Part 6: xsl:variable http://www.endusersharepoint.com/2010/02/09/unlocking-the-mysteries-of-data-view-web-part-xsl-tags-part-6-xslvariable/ No GeekSpeak on SharePoint 2007 WSS and MOSS Mon, 25 Oct 2010 16:52:47 -0400 http://wordpress.org/?v=2.8.6 hourly 1 By: Kristen http://www.endusersharepoint.com/2010/02/09/unlocking-the-mysteries-of-data-view-web-part-xsl-tags-part-6-xslvariable/comment-page-1/#comment-43851 Kristen Tue, 09 Mar 2010 20:07:34 +0000 http://www.endusersharepoint.com/?p=5835#comment-43851 Marc, I’ve burned through a lot of blogs trying to figure out a way to add a complex filter to a DataView. I have field, @Tag, which contains a comma delimited string, and a paramter, $TagsSelected, which is also a comma delimited string. If anyone of the $TagsSelected values are equal to anyone of the @Tag values, I want to display that row. I can not figure out a way to allow for this in XSLT. Originally, $TagsSelected was only one tag and I was able to use: However, this didn’t work exactly because if @Tag was ‘Air Force, Army, Navy’ and $TagsSelected was ‘Air’, it was included in the returned DataSet. ‘Air Force’ does not equal ‘Air’, but ‘Air’ is contained in ‘ Air Force’. Make sense? Anyway, is there a way for me to use javascript or create an xslt function to use instead of contains that will allow me to traverse through the @Tag string and the $TagsSelected string to see if any of the values match and return TRUE or FALSE? Marc,

I’ve burned through a lot of blogs trying to figure out a way to add a complex filter to a DataView. I have field, @Tag, which contains a comma delimited string, and a paramter, $TagsSelected, which is also a comma delimited string. If anyone of the $TagsSelected values are equal to anyone of the @Tag values, I want to display that row. I can not figure out a way to allow for this in XSLT.

Originally, $TagsSelected was only one tag and I was able to use:

However, this didn’t work exactly because if @Tag was ‘Air Force, Army, Navy’ and
$TagsSelected was ‘Air’, it was included in the returned DataSet. ‘Air Force’ does not equal ‘Air’, but ‘Air’ is contained in ‘ Air Force’. Make sense?

Anyway, is there a way for me to use javascript or create an xslt function to use instead of contains that will allow me to traverse through the @Tag string and the $TagsSelected string to see if any of the values match and return TRUE or FALSE?

]]>
By: Ron http://www.endusersharepoint.com/2010/02/09/unlocking-the-mysteries-of-data-view-web-part-xsl-tags-part-6-xslvariable/comment-page-1/#comment-31477 Ron Thu, 11 Feb 2010 20:26:31 +0000 http://www.endusersharepoint.com/?p=5835#comment-31477 HI Marc, I found something interesting to me.I have 4 webparts which display different kind of information for Employee based on current logged in User.as i said in my previous comment 3 of them was working and one of them not. so what i found is if u enable paging with custom filter like above webparts wont display correct no of data. Is is know bug while working with Sql Server and DVWP. THanks Ron HI Marc,
I found something interesting to me.I have 4 webparts which display different kind of information for Employee based on current logged in User.as i said in my previous comment 3 of them was working and one of them not.
so what i found is if u enable paging with custom filter like above webparts wont display correct no of data.

Is is know bug while working with Sql Server and DVWP.

THanks
Ron

]]>
By: Ron http://www.endusersharepoint.com/2010/02/09/unlocking-the-mysteries-of-data-view-web-part-xsl-tags-part-6-xslvariable/comment-page-1/#comment-31473 Ron Thu, 11 Feb 2010 19:43:21 +0000 http://www.endusersharepoint.com/?p=5835#comment-31473 Hi Marc, Nice Article, Mark i am working on DVWP with Sql Server and i have one Employee table in Sql server with column name ID now i want to filter rows based on ID. ID hold values like cmiller,charper and so on. now i have Server Veriable loginUser which store value like domain\cmiller and so on. i would like to filter based on cmiller so what i did is <xsl:variable name="Rows" select="/dsQueryResponse/NewDataSet/Row[@ID = substring-after($LogonUser,'\')]"/> but its not working and this same thing work for other webpatrs. ROn Hi Marc,
Nice Article,
Mark i am working on DVWP with Sql Server and i have one Employee table in Sql server with column name ID now i want to filter rows based on ID.
ID hold values like cmiller,charper and so on.
now i have Server Veriable loginUser which store value like domain\cmiller and so on.
i would like to filter based on cmiller so what i did is
<xsl:variable name=”Rows” select=”/dsQueryResponse/NewDataSet/Row[@ID = substring-after($LogonUser,'\')]“/> but its not working and this same thing work for other webpatrs.

ROn

]]>
By: Unlocking the Mysteries of Data View Web Part XSL Tags - Part 7: xsl:for-each | EndUserSharePoint.com http://www.endusersharepoint.com/2010/02/09/unlocking-the-mysteries-of-data-view-web-part-xsl-tags-part-6-xslvariable/comment-page-1/#comment-31412 Unlocking the Mysteries of Data View Web Part XSL Tags - Part 7: xsl:for-each | EndUserSharePoint.com Thu, 11 Feb 2010 15:00:35 +0000 http://www.endusersharepoint.com/?p=5835#comment-31412 [...] you have a rowset like the $Rows I talked about in the prior article about <xsl:variable>, you’ll want to do something with it.  If you’ve ever [...] [...] you have a rowset like the $Rows I talked about in the prior article about <xsl:variable>, you’ll want to do something with it.  If you’ve ever [...]

]]>