Form Input Value not updating from script

I have a text input as follows:

<td><input type="text" class="form-control assetID" autocomplete="off" placeholder="Asset ID" name="assetID[]"></td>

and a script that runs when the first input field is modified. I would like to update the value of the 2nd input when this script runs:

 $this.closest('tr').children('.form-control assetID').val(assetID);

with the value of the asset variable. I can’t get the form input to update here when this script runs and can’t see the issue here? I will have a series of similar inputs that are added dynamically so I’m not using an id for these but targeting them by the class.