Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 400
  • Last Modified:

Sharepoint joined sources and XSLT transformation problem.

In sharepoint I've joined to data sources:

A:
Person | Key
----------------
Tom     | A6
Fred    | A7
Phil      | A6-3
Peter   | A6-2
Tim      | A2
Ross   | A2; A7

B:
Key   | Door
---------------
A2     | Front Door
A6     | Back Door
A6-2  | Front Area
A6-3  | All Areas
A7     | Side Door

The intention is to have a joined view as such:
Key    | Door            | Persons
A2      | Front Door  | Tim, Ross
A6      | Back Door  | Tom
A6-2   | Front Area | Peter
A6-3   | All Areas   | Phil
A7      | Side Door   | Fred, Ross

if i do this:
<xsl:variable name="Rows" select="../../../Persons/Rows/Row[contains($dvt_ParentRow/@Title,@Key_x0020_Number)]" />

I get:
Key    | Door            | Persons
A2      | Front Door  | Tim, Ross
A6      | Back Door  | Tom, Phil, Peter
A6-2   | Front Area | Peter
A6-3   | All Areas   | Phil
A7      | Side Door   | Fred, Ross

Notice that A6 shows Phil and Peter. The reason I used 'contain' is so it will show Ross's name because doing a $dvt_ParentRow/@Title = @Key_x0020_Number would not show his name.

Hope this explanation works..
0
Alarius
Asked:
Alarius
1 Solution
 
Geert BormansCommented:
there might be a cast or space problem
try
<xsl:variable name="Rows" select="../../../Persons/Rows/Row[normalize-space($dvt_ParentRow/@Title) = normalize-space(@Key_x0020_Number)]" />
0
 
AlariusAuthor Commented:
Still the same problem. Seems like when it encounters a value separated by ; such as "A2;A7" (realized now in my original post i put a space between ; and A7) it treats it as one value. I wonder if its possible to split them then compare ?
0
 
zephyr_hex (Megan)DeveloperCommented:
why not have list A structured so that there is one row per key / person combination?  Ross would have two rows, one for each key.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now