question

bodin avatar image
bodin asked

Can I "append" value to titledata without loading it first?

Hi,

I wonder if we can append the value to the existing title key in one step?

The way I'm doing now is the steps below
1. download value of that title key from playfab, convert from JSON, and store it to local array variable.
2. add more value to that local array.
3. convert local array back to JSON and send it back to playfab server.

is there a way to add that value to playfab server without loading it first?

thanks in advance & Best reagrds,

Bodin

Title Data
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

·
Hernando avatar image
Hernando answered

Playfab doesn’t support append feature and Title Data is a cached and sharded resources that should not be updated frequently.

Since SetTitleData is not included in Client collection, I guess that you would like to call this API from Custom Secure Server or directly use Cloud Script to implement it.

In detail, move the Loading and Updating step to Cloud Script. Then, make the client calling the API ExecuteCloudScript to run this function, and the value which you would like to append to TitleData provided as args from the client and JSON in the JavaScript is easy to manage. After that, make CloudScript do the steps you posted.

1 comment
10 |1200

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

bodin avatar image bodin commented ·

Hi @Hernando

Thank you very much for your reply.

Yes, This is called from my custom server part, not from the client part.

0 Likes 0 ·

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.