I’m sorry for my english at the first. 
So…
I start to learn JS a few days, and I’m tring to create a consult page. Not just the consult page, but a request budget page.
I have a vehicle database where I have Code, Brand, Model, Fuel, Price and Status colums.
I creat a code to search the vehicle using the Code colum thats is show in a repeater list, and its working correctly but now I need to put in this repeater a button to select the price of vehicle and attribut to a variable (called price) that will be used to start my request budget.
Follow the exemple below.
Hello Kaique Roque,
take a look at this example. Here you will see how to get the current selected item value of a specific column. And also, how to save it somewhere else, like in another database.
https://russian-dima.wixsite.com/meinewebsite/dublicate-database
$w.onReady(function () {
let itemObj
$w('#dataset1').onReady( () => {
$w('#button1').onClick(()=>{
itemObj = $w('#dataset1').getCurrentItem();
console.log(itemObj)
console.log(itemObj.title)
$w("#dataset2").onReady(() => {
$w('#dataset2').setFieldValue('title', itemObj.title)
$w('#dataset2').save()
})
})
$w('#button2').onClick(()=>{$w('#TXTinfo').text = $w('#dataset1').getCurrentItem().title})
$w('#button3').onClick(()=>{$w('#TXTinfo').text = $w('#dataset1').getCurrentItem().title})
})
});
EDIT:
In your case you will need something like…
itemObj = $w('#dataset1').getCurrentItem();
myItem = itemObj.price
console.log(myItem)
Thank you @russian-dima!
I tried this code.
When I click the button it saves the value of the first line, even if I click the button of the last line for exemple.
EDIT: I’m using a repeater.
EDIT 2 : I try to use in a Table and its working.
Thank you!
You are welcome
. I’m glad that i could hep you.