Number of Friends for a User

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

jpdavid
Not Ranked
15 Posts
Points 180
By: jpdavid
Posted: Tue, Jul 1 2008 11:09 AM

Is there a way via Chameleon, or the API itself to get a count of the number of friends that a User has. Or will this need to be a custom Stored Procedure or SQL statement?

 

Answered (Verified) Verified Answers

Alex Crome
Top 10 Contributor
2,782 Posts
Points 41,115
TelligentSupportTeam
Answered (Verified) By: Alex Crome
Posted: Sun, Aug 3 2008 4:16 PM In reply to

For a programatic method, you could try (where xxxx is the ID of the user to get the number of friends of)

CommunityServer.Components.Friendships.GetFriendships(xxxx).Count

 
Answered (Verified)
  • Post Points: 5 |

All Replies

jpdavid
Not Ranked
15 Posts
Points 180
By: jpdavid
Posted: Tue, Jul 29 2008 9:25 AM In reply to

I have found a non-programmatic way of achieving this. By using a FriendList control and having a QueryOverrides section that links to a Pager Control the number of friends returned in the FriendList (which will depend on the QeryOverrides) can be accessed via:

[FriendListControlId].QueryOverrides.Pager.TotalRecords

 
Alex Crome
Top 10 Contributor
2,782 Posts
Points 41,115
TelligentSupportTeam
Answered (Verified) By: Alex Crome
Posted: Sun, Aug 3 2008 4:16 PM In reply to

For a programatic method, you could try (where xxxx is the ID of the user to get the number of friends of)

CommunityServer.Components.Friendships.GetFriendships(xxxx).Count

 
Answered (Verified)
  • Post Points: 5 |
Page 1 of 1 (3 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com