Changing image on selector change not working

Hi, everyone.

I'm trying to make an image dynamically change an image according to the item selected in the selector right below it. Did the most logical thing I could think of adding a function to 'on change' selector event. But it didn't seem to work. I must be doing something wrong but can't seem to figure what.

Here is the function that is executed on change of the selector status.

// Create a function to handle the onChange event of the 'asset_type' selector
function handleAssetTypeChange(value) {
  const coverImage = cover_image; // Assuming 'cover_image' is the ID of the RNImageWidget for the cover image

  // Define an object that maps the asset type options to their corresponding image URLs
  const assetTypeToImageUrl = {
    "Jaibot Hydro": "",
    "ASV Maco": "",
    "Stationary Buoy": "",
    "ASV Mascat": "",
    "ASV BlueBoat": "",
    "Weather Station": "",

  // Update the cover image source based on the selected asset type value
  const imageUrl = assetTypeToImageUrl[value] || "";

// Assuming 'asset_type' is the ID of the RNSelectWidget for the asset_type selector
asset_type.onValueChanged((value) => {

// Initialize the cover image with the default image URL

On the select component, On Change can you not run a js query to set the value to the value of the selected item in the dropdown?
In other words have the select dropdown populated with the following data:
Jaibot Hydro": "",
"ASV Maco": "",
"Stationary Buoy": "",
"ASV Mascat": "",
"ASV BlueBoat": "",
"Weather Station": "",
Maybe a screenshot will help....

I most certainly can.

Thank you @ScottR

Makes me wonder if "I didn't think of it, although I should've." still passes as a legit selfexcuse in my age or I should seek some medical advice. =)