Help with input boxes and dropdown box coordination

I want to filter a dataset by using a dropdown box and then update input boxes on the same page that are linked to the same dataset. This is what I have been trying.
export function dropdown1_onclick() {
//Add your code for this event here:
let myValue = $w(“#dropdown1”).value;
$w(“#text2”).text = myValue;
$w.onReady(function () {
//TODO: write your page related code here…
$w(“#NIaMem dataset”).setFilter( wixData.filter()
.eq(“newField”, myValue)
);

});