locked
DVWP Group by Multiple Choice Column Issues RRS feed

  • Question

  • Variations of this question have been asked a number of times, but I've never been able to find a situation quite like mine.

    I have a list that I need to be able to group by a multiple choice column.  Here's a little background so you all can better understand my requirement:

    We will receive a request for work from Business, which an Operator enters into a list.  When the Operator submits the list item, he or she also chooses the team impact for the request.  Sometimes that's a single team; other times it's multiple teams.  So, for instance, Work ID 1234 might impact Team 1 and Team 2; Work 1111 impacts just Team 1; and Work 2222 impacts just Team 2.

    Team Leaders are notified when work impacts their area, they click a link that takes them to a web part page I've created with a DVWP that groups the work items by the impacted teams.  The only problem is, I can't figure out how to make it where Team 1 and Team 2 only appear once.  I want:

    Team 1
       
    Work 1234
       Work 1111

    Team 2
       Work 1234
       Work 2222

    Instead I get:

    Team 1, Team 2
       Work 1234

    Team 1
      
    Work 1111

    Team 2
       Work 2222

    That make sense?  Thanks in advance for any help.

    Tuesday, August 2, 2011 7:35 PM

Answers

  • Hi ChrisPEditor1,

    I have a test in my local with the steps in your link, here I have a workaround.

    Link to the items displayed by the DVWP:

    Choose the item->right click the arrows->Format Item as->Hyperlink, type the link manually in the Address like the format: http://servername/sites/lists/DispForm.aspx?ID= {@ID}

    Redirect users back to the web part page created for displaying the DVWP:

    If no influence for the DispForm.aspx page, you can edit the page by adding a button on it for redirecting. Provide a method to respond the Onclick action of the button.

    Display a bit more information about the work items in the DVWP:

    Choose the item, right click the arrows->Insert->Cell to the right, choose the item information you want to add and drag it to the cell.

    Thanks,

    Qiao Wei

    • Marked as answer by ChrisPEditor1 Thursday, August 4, 2011 1:17 PM
    Thursday, August 4, 2011 12:33 PM
    Moderator

All replies

  • At this point, I'd even settle for a magical xpath expression that would group work with a single team's impact in one place, and a separate list with work that have multiple team impacts.

    Wednesday, August 3, 2011 1:29 PM
  • So, I just thought I'd toss out there that I managed, with a little help from this guy, to solve this issue, more or less.

    Caveats:

    • In the above example, Team Name had to be a text only field in another list as the key (or title) field in that list.
    • Work ID had to be the key field in the assignment list and connected to Team Name via a lookup to the list with team names in it.  This worked out ok for me, since I was using a list with those parameters for another function.

    If you follow the instructions in the link, replacing Features with Team Name and Car with Work ID, you get a result that is similar to---in form, if not in function---what I was trying to accomplish.

    At any rate, I've got the display more or less like I want.  Now I need to ramp up usability.  I'd like to be able to:

    • Link to the items displayed by the DVWP.
    • Redirect users back to the web part page created for displaying the DVWP.
    • Display a bit more information about the work items in the DVWP.

    Anyone care to help with those things? :)

    Wednesday, August 3, 2011 8:57 PM
  • Hi ChrisPEditor1,

    I have a test in my local with the steps in your link, here I have a workaround.

    Link to the items displayed by the DVWP:

    Choose the item->right click the arrows->Format Item as->Hyperlink, type the link manually in the Address like the format: http://servername/sites/lists/DispForm.aspx?ID= {@ID}

    Redirect users back to the web part page created for displaying the DVWP:

    If no influence for the DispForm.aspx page, you can edit the page by adding a button on it for redirecting. Provide a method to respond the Onclick action of the button.

    Display a bit more information about the work items in the DVWP:

    Choose the item, right click the arrows->Insert->Cell to the right, choose the item information you want to add and drag it to the cell.

    Thanks,

    Qiao Wei

    • Marked as answer by ChrisPEditor1 Thursday, August 4, 2011 1:17 PM
    Thursday, August 4, 2011 12:33 PM
    Moderator
  • Qiao Wei,

    Thanks for your help! Adding the other information from the list worked like a charm, just as you described.

    Turning the list items into hyperlinks doesn't appear to be working, unfortunately.  When I right-click the arrow for the xsl:value-of attribute (parameter? tag?) I get Text, Number, Currency, and Label.  I suppose I could write the code for that formatting in there, rather than rely on the UI, but I'm not sure how.

    Oh, and the redirecting worked out well, too, thanks for that!

    Thursday, August 4, 2011 1:17 PM