Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SharePoint Group By List Multiple Value Field

Posted on 2007-03-27
4
Medium Priority
?
4,970 Views
Last Modified: 2013-11-07
Does anyone know of a way to have a custom field on a Document Library in SharePoint that accepts multiple inputs (like a Choice select box), but still be able to create a Group By list view on that value in SharePoint 2007 (MOSS).
0
Comment
Question by:CGI_PortalPractice
[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
4 Comments
 
LVL 16

Expert Comment

by:cobrachen
ID: 18804222
Hi,

You could not use multiple values column and grouped by each of them. Think in database view of point. I had this request before and the answer was no. If you want to group by a certain value, you have to single them out.

Thanks.
0
 
LVL 2

Author Comment

by:CGI_PortalPractice
ID: 18860110
Was kind of hoping for a work around to the problem, not the generic you can't do it.  We actually decided to build the web part manually since no one was able to provide a solution.  We used the SPQuery object and a camel query.  You can find an example of how to use the SPQuery on msdn.  Here's kind of what we did to sort the information:

SPSite spsite = new SPSite("siteurl");
SPWeb site = spsite.OpenWeb();
SPList list = site.Lists["listname"];

SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='ServiceLevel'/><Value Type='String'>345</Value></Eq></Where>";

SPListItemCollection items = list.GetItems(query);

foreach (SPListItem item in items) //here its throwing exception.
{
    Console.WriteLine(SPEncode.HtmlEncode(item.Xml) + "<BR>");
}

You can get a CAML statement builder called U2UCamlCreator.exe.  Then you'd need to build a CAML statement that would select the field that is the choice column, and for the value you do a contains and then the value you want to do the select by.

We then built a web part that displays the information in sharepoint similiar to the way the regular datagrid does, except it lacks a lot of the additional functionality.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19168631
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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