how I can transfer a line from one table (connected to an database) to another database by clicking on a button.
Any help would be greatly appreciated!
thank you in advance
You need to provide more details, about the table, the trigger for saving the line etc…
You question is too general.
thank you for your answer.
I have a database named “request”
and another database named “list of requests”.
I connected the “request” database to a table named “table1” to display it in read & write mode.
what I wanted to do, is select a line from “table1” and click on a button named “approved”. to transfer the selected line of the database “request” to the database named “list of requests”.
thank you for your answer.
I have a database named “request”
and another database named “list of requests”.
I connected the “request” database to a table named “table1” to display it in read & write mode.
what I wanted to do, is select a line from “table1” and click on a button named “approved”. to transfer the selected line of the database “request” to the database named “list of requests”.
Ala, provided that the list of requests collection has the same structure (field keys) as requests, this code will give you what you’re after. Obviously, you will want to change the dataset and collection names to what they really are.
export function approved_click(event){
let CurrentRec = $w('#RequestDataset').getCurrentItem();
wixData.insert("ListOfRequests",CurrentRec)
.then( (results) => {
console.log("successfully inserted");
} )
.catch( (err) => {
console.log(err);
});
}
Yes yes yes yes yessssss !!! your are genius Man 10000000 thank you !!!
its working thaaaaaaaaank you