# How to update leaderboard record's metadata only

**URL:** <https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011>\
**Category:** Game Design\
**Tags:** server-framework\
**Created:** [July 4, 2023, 1:32pm UTC](https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011 "2023-07-04T13:32:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://forum.heroiclabs.com/u/Mohammed)\
**Post date:** [July 4, 2023, 1:32pm UTC](https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011/1 "2023-07-04T13:32:47Z")

</div>

**Server version:** 3.15.0+1783fad1v  
**Using Golang**

I am trying to update a leaderboard record’s metadata without changing anything else in the records.  
I am trying to do this from server side only.  
My leaderboard is created with Operator = Set

I tried to list the records first using **nk.LeaderboardRecordsList**  
Then write the record again using **LeaderboardRecordWrite** after updating metadata

The issue with this approach that it will not accept Setting the record if the score is the same

---

<div class="post-metadata">

**Author:** ![flavio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/flavio/32/2161_2.png) [@flavio](https://forum.heroiclabs.com/u/flavio)\
**Post date:** [July 5, 2023, 10:18am UTC](https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011/2 "2023-07-05T10:18:31Z")

</div>

Hello @mohammed,

It’s unusual to update records when the score doesn’t change. Could you share what kind of metadata you are storing there and why it needs to be updated?

---

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://forum.heroiclabs.com/u/Mohammed)\
**Post date:** [July 5, 2023, 12:54pm UTC](https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011/3 "2023-07-05T12:54:05Z")

</div>

I stored player profile like Avatar, Frame & Country flag.  
so when client list the leader board it doesn’t required another call for players profiles.

---

<div class="post-metadata">

**Author:** ![Mohammed](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Mohammed](https://forum.heroiclabs.com/u/Mohammed)\
**Post date:** [July 6, 2023, 6:49am UTC](https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011/4 "2023-07-06T06:49:44Z")

</div>

Hi @flavio

One solution is to set the cups with different value,  
then set the original cups count again.

Please let me know if you have a better solution

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [July 6, 2023, 10:48am UTC](https://forum.heroiclabs.com/t/how-to-update-leaderboard-records-metadata-only/4011/5 "2023-07-06T10:48:33Z")

</div>

Hello @Mohammed,

I’d suggest you combine the profiles data and the scores in a single RPC that uses both calls (fetching all profiles in a single call) instead of duplicating the profile data in the records metadata, it’ll perform well and will also prevent any changes to the profile data to have to be propagated to any existing records.

Best
