Database search and autofill form..

I need help with database. I have two database, one is member database, and another is register database. Is it posible to make form with search option from members database, and than upload that data to register database?

No help??? :frowning:

Can you please explain your situation more extensively

I have member database, i need to make a form where member from database input ID and form will autofill from database,than on button click save form imputs to another database (register user for some congres…)

You will need to use Wix Data Query to get the item string from the Database which is tied to the input ID and then populate the fields with the items as you want.

Then you need to use Wix Data Insert to insert the data in the 2nd Database.

@shantanukumar847 thank You…it works. But I have some problems in code. on export function button458_click(event), “ime” is column in database, how to put code to import search data from query,its different for every search…

import wixData from ‘wix-data’

//For full API documentation, including code examples visit Velo API Reference - Wix.com

$w.onReady( function () {
//TODO: import wixData from ‘wix-data’;
});

export function searchButton_onClick(event) {
wixData.query(‘baza’)
.contains(‘jmbg’, $w(‘#jmbg’).value)
.find()
.then(res => {
$w(‘#table1’).rows = res.items;
});
}

$w.onReady( function () {
$w(“#table1”).columns = [{
“id”: “col1”,
“dataPath”: “ime”,
“label”: “Ime”,
“width”: 100,
“visible”: true ,
“type”: “string”,
}, {
“id”: “col2”,
“dataPath”: “prezime”,
“label”: “Prezime”,
“width”: 100,
“visible”: true ,
“type”: “string”,
}, {
“id”: “col3”,
“dataPath”: “brLicence”,
“label”: “licenca”,
“width”: 100,
“visible”: true ,
“type”: “string”,
}, {
“id”: “col4”,
“dataPath”: “idBroj”,
“label”: “ID broj”,
“width”: 100,
“visible”: true ,
“type”: “string”,
}, {
“id”: “col5”,
“dataPath”: “eMail”,
“label”: “E mail”,
“width”: 250,
“visible”: true ,
“type”: “string”,
}, {
“id”: “col6”,
“dataPath”: “jmbg”,
“label”: “jmbg”,
“width”: 100,
“visible”: true ,
“type”: “string”,
}];
});

export function button458_click(event) {

let toInsert = {
“ime”: “Ime”,
“prezime”: “Prezime”,
“idBroj”: “ID broj”,
“brojLicence”: “licenca”,
“eMail”: “E mail”,
“jmbg”: “jmbg”,
};

wixData.insert(“PrijavaPredavanja”, toInsert)
.then( (results) => {
let item = results; //see item below
} )
. catch ( (err) => {
let errorMsg = err;
} );
}