Solved

Display different variable in group heading-XSLT Sharepoint

Posted on 2010-08-19
4
537 Views
Last Modified: 2013-11-18
Right now my output displays the contents of a variable called "$fieldvalue".

Instead of this, I would like it to display the contents of a field called "TaskHierarchy".  How do I do this?

I believe the code snippet is the correct block of code, plus I attached the complete code as an attachment.
<xsl:if test="$fieldtitle">: </xsl:if>
<xsl:choose>
<xsl:when test="$fieldtype='url'"><a href="{$fieldvalue}"><xsl:value-of select="$fieldvalue"></xsl:value-of></a></xsl:when>
<xsl:when test="$fieldtype='user'"><xsl:value-of disable-output-escaping="yes" select="$fieldvalue" /></xsl:when>
<xsl:otherwise><xsl:value-of select="$fieldvalue"></xsl:value-of></xsl:otherwise>
</xsl:choose>

Open in new window

complete-code.txt
0
Comment
Question by:IntercareSupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Expert Comment

by:Manish
ID: 33508729
what happens when fieldtype is "url"?
is any if condition working?
0
 

Author Comment

by:IntercareSupport
ID: 33511062
You can see the output as it is displaying now.  I set up each major task to group together.  That's great.

So what I want to see is not "Task 7" (or whatever the numuber), but the name of the superset.  The variable that holds this is called "TaskHierarchy".

Make sense?  See attached screenshot.
output.png
0
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
ID: 33518206
So are you saying that another variables holds this value "TaskHierarchy",
so you can use that variable while displaying like
<xsl:value-of select="$yourVariable"></xsl:value-of>
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to count occurrences of each item in an array.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question