I am trying to achieve the following:
- A "Points" table that stores usernames and points associated with them
- A "Leaderboard" table that aggregates all points for the users, i.e. sums up the points for each user
I set up the Leaderboard table first where I defined a "Username" field as the primary key and a "Total" field as a number field. Worked fine.
Now I wanted to setup the Points table so a Username field points back to the primary key "Username" of the Leaderboard table, like this:
{
"name": "Points",
"description": "Points table to track points per user",
"fields": [
{
"name": "Id",
"type": "singleLineText"
},
{
"name": "Username",
"type": "multipleRecordLinks",
"options": {
"linkedTableId": "tbl..."
}
},
{
"name": "Points",
"type": "number",
"options": {
"precision": 0
}
}
]
}
While this sets up a field "Username" as expected and also defines it as a linked field, this field won't point to the Username field of the Leaderboard table, though. The "inverseLinkFieldId" is not the same as the id of the primary key in that table.
What am I doing wrong here?