I have two database in one dynamic page as shown in the image below.
The “Project name” field is the main field from the database called “Non-DMD”.
The grey box is another dataset called called “Non-DMD-C3” shown in the grey section below.
The “Non-DMD-C3” connected to “Non-DMD” through a reference field call “reference”. each “Non-DMD” will have multi “Non-DMD-C3” records.
All I want is to dynamically update the refrence without selecting it from the dropdown field (see the mark-up circle) or do it manually from the database. The reference should automatically be same to the project name.
I managed to update the field automatically through the code below, but still can’t save the value back to the database.
$w("#repeater").forEachItem( ($w, itemData, index) => {
$w("#dropdown").options = [{"label": $w('#projectname').value, "value": $w('#projectname').value}];
$w("#dropdown").selectedIndex = 0;
Any help about how to save this value back to the database ?
Thanks,