question

brook avatar image
brook asked

How to set key in UpdateSharedGroupData correctly in cloud script

handlers.updateSharedData = function(args,context) {

var writerID = args.senderID;

var content = args.message;

var result = server.UpdateSharedGroupData({

SharedGroupId:args.GroupID,

Data: { writerID : content },

Permission: "Public"

} ); };

From the code above I got the key as writerID instead of the actual content inside the value How should I write this correctly?

Thank you In advance

capture.png

capture.png (9.0 KiB)
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

·
brendan avatar image
brendan answered

We have a full write-up of using dynamic keys in Cloud Script calls here: https://community.playfab.com/questions/496/206963508-Writing-to-a-dynamic-Key-in-Cloud-Script.html. Can you have a look at that, and let us know if you have any additional questions?

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.

brook avatar image brook commented ·

Thank you Brendan

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.