Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9137383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:05:49+00:00 2026-06-17T09:05:49+00:00

I have a sharepoint 2010 list with a column proposalID. The values in that

  • 0

I have a sharepoint 2010 list with a column “proposalID”. The values in that column are
5555-01, 5555-02, 5555-03, 6666-01, 6666-02, etc.

I want to group by the 4 characters to the left of the dash. So the grouping would display 3 items under 5555 and 2 items under the group 6666, etc.

Using Sharepoint Designer 2010, I added a blank dataview webpart, connected to my list, and from the ribbon chose to sort by the Proposal ID column. It rendered the below xsl ddwrt code:

I’ve been trying various syntax to change the string function but have not been successful. I tried to glean some knowledge from this posting, http://jamestsai.net/Blog/post/SharePoint-Data-View-Data-Form-Web-Part-Group-items-by-month-on-DateTime-field.aspx – but was not able to apply the string syntax to my case.

Could someone suggest how I can accomplish this grouping? Thank you in advance.

<xsl:choose>
  <xsl:when test="not ($dvt_groupfield)">
    <xsl:value-of select="ddwrt:NameChanged(string(@ProposalID), 0)" />
  </xsl:when>
  <xsl:otherwise></xsl:otherwise>
</xsl:choose>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:05:50+00:00Added an answer on June 17, 2026 at 9:05 am

    Based on that blog post, I would presume that the following would work in this case:

    <xsl:choose>
      <xsl:when test="not ($dvt_groupfield)">
        <xsl:value-of select="ddwrt:NameChanged(string(substring(@ProposalID, 1, 4)), 0)" />
      </xsl:when>
      <xsl:otherwise></xsl:otherwise>
    </xsl:choose>
    

    using 1 and 4 as the bounds for the substring.

    And similarly for the title, also as indicated in the blog post:

    <xsl:when test="not (@ProposalID) and (@ProposalID) != false()">
      <xsl:value-of select="' '" />
    </xsl:when>
    <xsl:otherwise>
        <xsl:value-of select="substring(@ProposalID,1,4)" />
    

    Could you give that a try?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list in Sharepoint 2010 which has a Choice type column that
We are using SharePoint 2010 Foundation. We have an item in a list that
I have a SharePoint 2010 Task list which includes an Assigned To column of
I have a Sharepoint 2010 list which has a column of type Number how
I have a list in Sharepoint 2010 with a choice column. User can enter
The Sharepoint 2010 Current User Filter Web Part allows List Web Parts that have
I'm using Sharepoint 2010 and I have a list where I want users to
SharePoint newbiew question, I have installed SharePoint 2010 and want to be able to
I have a custom Sharepoint 2010 web part that runs the user through a
I am using SharePoint 2010 and have a customized newform.aspx and editform.aspx that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.