Will this collection use multiple rows, or is the entire collection intended to be 1 row?
If multiple rows are possible, you’ll first need some criteria for the 2 pages to know the data needs to be on the same row, likely using wixData.query() or possibly wixData.get() if you have a known ._id value for that row.
Once you have the initial row data, you can freely modify that object in the 2nd page. Aftwards, use wixData.update() to push the modified data back into the database.
Deciding how to determine the 2 pages should be sycning up on this row would likely be the hardest part, depending on your application.
Disclaimer: Untested generic code.
function PageOne()
{
let newEntry = {
‘_id’ : ‘123’ ,
‘data1’ : ‘DataFromPage1’ ,
}
wixData.insert( 'MyDatabase' , newEntry);
}
function PageTwo()
{
wixData.get( ‘MyDatabase’ , ‘123’ )
.then( results => {
results.data2 = ‘DataFromPage2’ ;
wixData.update( ‘MyDatabase’ , results);
})
}