We are trying to find players with a custom PlayerData(Title) field : playerLanguage != ES
This syntax does not work however. Is there a search syntax guide somewhere?
We are trying to find players with a custom PlayerData(Title) field : playerLanguage != ES
This syntax does not work however. Is there a search syntax guide somewhere?
Could I get some information on how this should be done : we suspect some players have missing information in their custom playerData, and want to get information on that. I am reading up on CloudScripts, have installed Postman, and now trying to figure out how we could query them.
pseudocode:
playersWithMissingFieldsIdList = new List<string>;
for (player in AllPlayers){
if (string.IsNullOrEmpty(playerName)) playersWithMissingFieldsIdList.Add(player.id);
if (string.IsNullOrEmpty(playerLanguage)) playersWithMissingFieldsIdList.Add(player.id);
}
return playersWithMissingFieldsIdList;
In this case, you can use this statement NOT”ES”. You can click the [SEARCH TIPS] that under the [NEW PLAYER] button in the [Player] page to find some search samples. Please check this doc for the search field list. And you can find the syntax guide link in this doc.
Trying:
playerLanguage NOT "ES"
playerLanguage = NOT "ES"
Neither is returning any results.
Sorry, I did not explain it clearly. Actually, PlayFab doesn't support using custom data to search the player in the GameManager, but you can use the country where players last login to search players. Please use the NOT"ES" or "ES" directly.
So searching through PlayerData fields is not supported at all? It sometimes works though, for example playerBestScore = "12" works for me. This is very unclear, if it is truly so that custom playerData search is not supported that should be stated clearly in the very beginning of search tips?
We tried it and the results of searching playerBestScore = "12" and searching "12" are the same. Maybe playerBestScore = doesn't have effects.
That doesn't make any sense though, what if I had multiple numeric fields... But OK, I think we can come to the conclusion that we should not rely on searching playerData in any case.
Current 'Search Tips' does not provide a clear syntax guide. Boolean operators for example?
There's something broken in the search system. We have a playerData field called "playerLanguage" with two letter country codes. ( FI, ES for example )
I have a player with "ES" as the language code.
I search with playerLanguage = "FI"
And that returns the player with "ES" as the language code.
The first thing is playerLanguage can't be used for search. PlayFab doesn't support using player data to search the player in the GameManager. We can only use the fields on this list. You can use the country code "ES", because it is included in the built-in country code list too.
About boolean operators for example. You can refer to the following sample.
// Players who’ve logged with Facebook but did not create an account using Facebook "Facebook" AND origination:(NOT "Facebook")
Could I get some information on how this should be done : we suspect some players have missing information in their custom playerData, and want to get information on that. I am reading up on CloudScripts, have installed Postman, and now trying to figure out how we could query them.
pseudocode:
playersWithMissingFieldsIdList = new List<string>;
for (player in AllPlayers){
if (string.IsNullOrEmpty(playerName)) playersWithMissingFieldsIdList.Add(player.id);
if (string.IsNullOrEmpty(playerLanguage)) playersWithMissingFieldsIdList.Add(player.id);
}
return playersWithMissingFieldsIdList;
2 People are following this question.