Link to home
Start Free TrialLog in
Avatar of Alarius
AlariusFlag for Afghanistan

asked on

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..
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

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)]" />
Avatar of Alarius

ASKER

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 ?
ASKER CERTIFIED SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial