Adding a string to Database in velo

I want to add the total variable to totalpoint in my database. How can I do it? İt’s simple but I am new :slight_smile:

Are you trying to add a new item that has a property totalPoint defined by the user?
Or are you trying to edit a item that already has that number?

First answer would be:

import wixData from 'wix-data';

let toInsert = {
    title: "whatever",
    totalPoint: undefined,
}

export async function q2a2_click(event) {
    toInsert.totalPoint = 5 //put the number you want
    let insert = await wixData.insert("PerformanceTable", toInsert)
    console.log(insert)
}

The second would be more difficult cause you would have to know the item you want to edit.

Thank you so much Bruno :slight_smile: