I have a list and I want to produce a count of items (rows) in the list filtered by a value (lets say its fruit type) in one of the fields.

easy enough to create a view that shows this, choose your columns to display, check "count" in the totals option, filter by the one your intrested in and you are away.

Problem is i dont want it in that format. I want to take the actual number ( e.g. how many rows had lemon as a fruit type, answer =4 ) and show that on another page, as a kind of dashboard number ( e.g. how many orders for lemons have we had)

This seems like such a simple thing to do, but 2 hours of playing suggest otherwise. Of course it could just be me being thick.

Any clues very greatly appreciated

  • When I converted a which is grouped by some values to an XSLT data form, it loses the little (nn) count of items for each group. I want to display the count in XSLT view. any ideas? – user8922 Jun 18 '12 at 13:58

This should be easy, there are couple ways to do it ( there are many :-)

  • Connected Webparts : Create a two Webparts, one with the Fruit type with count (group by) and second with the selected column linked by the fruit type , you can use use a XSLT web part and use query string as type if you want to display in separate page

  • Client Object Model : Use the client object model to get the Field type with count (CAML) then on click run the dynamic caml with the type selected and display the results, use JQuery templates to beautify the UI

  • Simple (Group by) : Create the List view with group by Fruit Type, and pick the columns

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.