• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 591
  • Last Modified:

Joined dataview list count based on filter - sharepoint 2010

I have a DataView Webpart that displays a set of list items (articles). In each item(article) being displayed, I want to show a counter of items from another list that are linked to the unique ID of the first list. My second list consists of comments. Essentially I want to have a comment counter per article.

Thank you in advance for your answers
0
bsmcy
Asked:
bsmcy
  • 2
1 Solution
 
quihongCommented:
One possible solution would be to have a Workflow on your Comments list, update a counter on your Article list whenever a comment is made.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

you need to add a column to your main list, which needs to be a Lookup type. Point it to your Comments list and in the column selection drop-down choose the option with "Count related" in brackets. Then build that column into your DVWP.

cheers, teylyn
0
 
quihongCommented:
Wow!

Give it up to Teylyn!!! I didn't even know that option existed!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now