question

Kevin Brian Valmonte avatar image
Kevin Brian Valmonte asked

Query Number of Players Based on User Data Criteria (using CloudScript)

Good day. I would like to get the count of users who has particular value criteria in specified player data field(s). For example, if our player data schema has a key called item, I want to get the number of players with knife item. Is this possible using CloudScript or is there a feature in Playfab that can give me such information? Thank you very much.

Player DataCloudScript
10 |1200

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

1 Answer

·
pfnathan avatar image
pfnathan answered

This is not supported. But here is a workaround to achieve this, however. You can set a player tag if a player has "Item" key in the player data, and then make a segment on that tag. If it is an existing title with existing data, you would need to change the code to set tag first, and then run the migration to make all existing data consistent.

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.