0

if we want to access a sharepoint list and get data in a item we can access like this:

    foreach (SPListItem item in itemcoll)
    {            
        string modified = item["Modified"].ToString();
    }

Similarly, to access a Sharepoint Group SPGroup programmatically, how to do this? I want the modified column value for each user who joined a spgroup.

Abhimanyu
  • 413
  • 2
  • 13
  • 34
  • Is your question about finding out all users within a group? Then this post might be a duplicate: http://stackoverflow.com/questions/325007/get-users-by-group-in-sharepoint – Dennis G Nov 02 '10 at 08:21
  • Can you explain a bit? Do you want to find all users with a group? What did you mean by "modified" column value for each user? – Shoban Nov 02 '10 at 08:23
  • when you access any sharepoint group, you will find the users in that group along with when he joined in the group in a column name "Modified"..how to get the value in that column from backend? – Abhimanyu Nov 02 '10 at 08:54
  • @Moontear, its not the thing i want. I want the value(datetime) when a user joined the group. – Abhimanyu Nov 02 '10 at 08:56
  • I don't think there is any "join date" or "modified" date for when a user joined a particular group. – Dennis G Nov 02 '10 at 09:26
  • @Moontear, if you open any spgroup page, you will find the detail view. In this view you are having columns like Attachments ,Name (with presence) ,Name (with presence) ,Department. Right? tell me how to access these values for a item(here user) in the spgroup programmatically – Abhimanyu Nov 02 '10 at 09:39

1 Answers1

2

Your question is about querying information of some user in some group. In particular you are interested in the "modified" date of the user or when he/she joined a particular group.

I don't think there is a field for "join date" of a group, but you can query the extended information on users (department, presence etc.) by querying the hidden "User Information list".

First to get users by group you can refer to the following post: get users by group in sharepoint.

And to query the user information list you can follow either one of these links:

Community
  • 1
  • 1
Dennis G
  • 21,405
  • 19
  • 96
  • 133