2 DROPDOWNS CONNECTED to 2 DIFFERENT DB's

First, i’ve had a lot of help from another member getting this far. I can not seem to figure out where to add the code for the 2nd Dropdown and 2nd Textbox. The 2nd Dropdown and the 2nd Textbox are connected to a 2nd database. I’ve attempted to enter code into different parts of the string but can not get the 1st and 2nd dropdowns and textboxs to both work at the same time. Any suggestions/articles/advice would be appreciated.

import wixData from ‘wix-data’ ;

var DBFIELDS = , ITEMS ;

//-------- USER-INTERFACE -------------------------------------------------
var txtFieldID = “#textBox1
var DD_ID1 = “#dropdown1

var DATABASE = “Agerange”
var DBLIMIT = 1000
var OUTPUT_FIELD = “ageRangeValue” //<— check if this ID is right in your DATABASE
DBFIELDS [ 0 ] = “ageRange” //<— check if this ID is right in your DATABASE
//-------- USER-INTERFACE -------------------------------------------------

$w . onReady ( async ()=>{
await wixData . query ( DATABASE )
. limit ( DBLIMIT ). find ()
. then ( results => {
ITEMS = results . items
create_UniqueDropdown 1 ( ITEMS );
});

$w ( DD_ID1 ). onChange (()=>{
let INDEX = $w ( DD_ID1 ). selectedIndex
$w ( txtFieldID ). value = ITEMS [ INDEX ][ OUTPUT_FIELD ];
});
});

function create_UniqueDropdown1 ( items ) {
const uniqueTitles1 = getUniqueTitles1 ( items );
$w ( DD_ID1 ). options = buildOptions1 ( uniqueTitles1 );

function getUniqueTitles1 ( items ) {
const titlesOnly = items . map ( item => item [ DBFIELDS [ 0 ]]);
return [… new Set ( titlesOnly )];
}

function buildOptions1 ( uniqueList1 ) {
return uniqueList1 . map ( curr => {
return { label : curr , value : curr };
});
}
}

Please observe the community guidelines and refrain from using ALL CAPS. Thank you.