Reference field broken

Hi there

Some advice please. I’m currently using a series of drop downs to find and return an item from one collection and to post it into another collection as a reference field however the reference field is constantly returning an error.

Any ideas how this can be made to work?

export function button50_click(event) {

if ($w(“#manufacturerDropdown”).valid && $w(“#modelDropdown”).valid && $w(“#memoryDropdown”).valid && $w(“#input225”).valid && $w(“#input226”).valid) {
let item = {
‘proposalReference’: $w(“#proposalReferenceCodeText”).value,
‘manufacturer’: $w(“#manufacturerDropdown”).value,
‘model’: $w(“#modelDropdown”).value,
‘memory’: $w(“#memoryDropdown”).value,
‘quantity’: $w(“#input225”).value,
‘fullDeviceName’: $w(“#modelDropdown”).value + " " + $w(“#memoryDropdown”).value,
‘upfront’: $w(“#input226”).value,
“totalUpfrontPayment”: ($w(“#input226”).value * $w(“#input225”).value).toString()

    } 
    wixData.insert("ProposalDeviceRequirements", item) 
        .then(() => { 
            $w("#dataset10").refresh(); 
            console.log("dddddddddddddddd"); 
        }) 
        . **catch** ((err) => { 

let errorMsg = err;
console.log(errorMsg);
});
$w(“#box50”).hide();

1 Like

did you ever solve this?