question

Planet 316 avatar image
Planet 316 asked

List of entity groups

We are currently implementing a system into an app that is basically a clan system, however I didn't see (maybe overlooked it) a way to list available groups or get a sample of available groups.

I saw the getGroup call, but that appears to be for a single group and requires one to pass in the entityKey. I would like a way to simply do a call and have it return 25 groups or so, maybe with an option to choose a different set so the same group isn't always coming up if there are multiples.

Is there a way to do this that I'm completely overlooking?

Thank you.

entities
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy avatar image
Andy answered

Believe it or not, no, we don't currently have a great way of returning a set of groups to a player if that player is not a member of those groups or somehow already knows the ids. I chatted with the feature team and they acknowledged the gap, so I'm hopefully it'll be addressed in the future. For now, you'd need to track group ids outside of PlayFab if you wanted a queryable list. There are probably other workarounds, but I think that's going to be the most reliable.

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

cool-daniel avatar image cool-daniel commented ·

Hey, is there any update on this? Or do we still have to use workarounds

0 Likes 0 ·
Andy avatar image Andy ♦♦ cool-daniel commented ·

We're hoping to have group search available soon. We wanted it by the end of this year, but it may slip into early next.

1 Like 1 ·
herzock avatar image herzock Andy ♦♦ commented ·

Hey, do you have an estimated date for when this may be released by now?

0 Likes 0 ·
seanlangre avatar image seanlangre commented ·

Do we have a group search function yet? If not, is it still on the roadmap?

0 Likes 0 ·
Pedro Juan avatar image Pedro Juan commented ·

Any news on this? This is very important feature for my social game

0 Likes 0 ·
kennyroy avatar image kennyroy commented ·

Need this soon!

0 Likes 0 ·
Marius Badita avatar image
Marius Badita answered

Any news on this? It's been more than a year. We're researching if playfab is a good fit for our project and this might be just the thing that makes it a no go.

10 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kennyroy avatar image kennyroy commented ·

I'm hacking around this a bit.

Would be good to know exactly what you need returned to know if I'm doing the same thing.

0 Likes 0 ·
Marius Badita avatar image Marius Badita kennyroy commented ·

Thank you for the offer.

I'm trying to have a list of groups/clans and the player can apply for membership to one of them.

0 Likes 0 ·
kennyroy avatar image kennyroy Marius Badita commented ·

The way I'm doing this is having the server always initially add a dummy "admin" playfab player as a member of the group through cloudscript whenever a group is created. Then you can do a ListMembership() on that admin player whenever you want a "semi" up to date list of groups available. Remember, entity group takes titleplayeraccount, so you also have to manage getting that from a logged in player (and in cloudscript the auth context currentplayer is always a playfabId). I suppose if the game get very successful returning that result will cross a certain data and execution time threshold. At that point, there are methods to fix that, like saving the listmembership result as an object on the admin entity, so that it's "cached" for others to grab, or even creating new dummy admins when rules are met.

0 Likes 0 ·
Show more comments
Thiago Lopes Rosa avatar image Thiago Lopes Rosa kennyroy commented ·

Hi Kenny!

Very nice idea about the "admin" user in order to list the groups!

Do you have any workarounds for these:

1) How to get the group members info (i.e. display name) without having to make an API request for each one of them?

2) Were you able to figure out how to create a leaderboard with only the guild members? (internal guild leaderboard)

3) And what about a leaderboard between guilds?

4) How do you limit the size of the guild? (i.e. maximum of 20 members)

Thank you!

0 Likes 0 ·
kennyroy avatar image kennyroy Thiago Lopes Rosa commented ·

1) GetProfiles returns entity objects, so I store DIsplayName as an object on those

2) THat is constructed in realtime on clients, from stats saved on entity objects too.

3) Between guilds would be the same , but you are doing a lot of constructing on clients for that.

4) CloudScript would be needed. Would grab the number of profiles from GetMembers() and only addmember if it's under 20

0 Likes 0 ·
Show more comments
Pavan avatar image
Pavan answered

Any update on this?? We're researching and still API is not available to list all groups.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.