Solved

Display different variable in group heading-XSLT Sharepoint

Posted on 2010-08-19
4
534 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
  • 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

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 …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

735 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