Adding / Concatenating a variable

I have 3 user inputs (dropdown, radio button & checkbox) which upon user button click I want to concatenate the inputs, and to search database and return a value.
All was working except for when the checkbox (which is optional - as it is ‘added extras’) when it did not have anything checked.
So, I have pulled that out from the concatenation of the inputs (see phoebe in the code below), and made an If Else statement (see add1 in the code), this is consoling out correctly.
However now I’m struggling to add the variable ‘add1’ back into the concatenation, so that the database lookup will reflect again correctly.

Basically I don’t know how to add the variable (‘add1’) correctly to the concatenation (‘phoebe’) with the dropdown and radiogroup inputs.

Any help for this self-taught beginner coder is much appreciated!

Thanks,

Juanita

// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixData from ‘wix-data’
let add1;

$w.onReady( function () {
});

export function button2_click(event) {
search();
}

function search() {
let box2 = ${$w( '#checkboxGroup2' ).value}

if (box2 === “” ) {
add1 = “none”
}
else {
add1 = box2;
}
console.log (add1)
let phoebe = ${$w( '#dropdown1' ).value} ${$w( '#radioGroup1' ).value} { 'add1' };
console.log(phoebe);
wixData.query( ‘QuotePricing’ )
.eq( ‘quoteType’ , phoebe)
.find()
.then(res => {
$w( ‘#repeater1’ ).data = res.items;
});

$w( “#group3” ).show( “fade” , fadeOptions);
//$w(“#box1”).collapse();
}

let fadeOptions = {
“delay” : 500
};

After much persistance… I figured it out. The below code solved my problem. So adding string to concatenation I used ${…}. Hope this is of help to someone in future. :slight_smile:

let phoebe = ${$w( '#dropdown1' ).value} ${$w( '#radioGroup1' ).value} ${add1};

Thx 4 sharing.