• 0

SharePoint 2010: Limit a grouped view to only 1 item?


Question

Hi! I'm using SharePoint 2010 Foundation to build an instrument calibration tracking database.

 

Essentially, there are 2 tables: Devices and Calibrations. Devices is the parent list, and Calibrations is the child. One Device can have many Calibrations.  This relationship is established with a LookUp field. So when a new calibration is to be added to the system, the date of the calibration, the due date for the calibration, and the Device the calibration was for is added to the form (as well as some other stuff).

 

What I'm trying to create is a custom view that shows the Devices in a table format with the most recent Calibration dates presented.

 

In SQL, I'd query the Calibration table, link to the Devices table, GroupBy the DeviceID, sort by the Calibration Date and limit the grouping by 1.

 

I'm trying to do something similar in SharePoint 2010, but I can't figure out how to limit the groups to just 1 line item. I don't want to see all the old calibrations done on an item (that is a different view), I want to only see the most recent.

 

Here is what I have so far (ignore the "MAX =", I was just messing around with stuff):

http://i.imgur.com/pGvOhlT.png

 

What I'm trying to accomplish is only showing 1 record per group. So that one group for "PT-65" is showing 2 records, and I only want it to show the most recent.

 

How do I achieve this?

 

Note: I'm on the limited "Foundation" version of SharePoint 2010.

 

Thanks for your time and input!

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.