0

Am creating a custom wp to count users post on site feed but cant find the list source.

Will basic CAML and item count will do?

SPList spl3 = site.Lists["SiteFeedName"];
SPQuery query3 = new SPQuery();
query3.Query = @"<Where><Eq><FieldRef Name='Author' /><Value Type='Text'>" + login_name() + "</Value></Eq></Where>";
SPListItemCollection items = spl3.GetItems(query3);
intmpa_score = items.Count;

Is there a way doing this?

TIA.

  • Post you code, so far what you have tried. – Pradip R. Aug 18 '15 at 5:44
  • One thing, you have no row limit set in your query so you will definately not get all items. – Robert Lindgren Aug 18 '15 at 6:34
  • The "SiteFeedName" virtually don't exist and was trying to find what list name to use. Before going further I need to know the site feed list / library source. – Jonathan.B Aug 18 '15 at 7:13

Your Answer

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

Browse other questions tagged or ask your own question.