Issue Setting Value of Text Input Field

I have a program set up to populate text fields so that when a row is clicked, dialogue boxes are populated so that the user can edit the contents:

async function getMenuClicked (menuId) {
	let customMenu = await custProm;
console.log("Menu ID: ", menuId);
for (i = 0; i < customMenu.length; i++) {
if (menuId == customMenu[i].menuId) {
    document.getElementById("menuId").value = customMenu[i].menuId;
    document.getElementById("menuTitle").value =  customMenu[i].menuTitle;
    document.getElementById("menuArg").value = customMenu[i].menuArg;
    document.getElementById("parentId").value = customMenu[i].parentId;
}}
}

This works fine, but when I attempt to read values from a file, or input text directly (both shown below), the text input fields do not populate:

function procCustBBCXtags (oldCodes){
	let oldTags = oldCodes;
	console.log(JSON.stringify(oldTags,null,2).substring(0,100));
	let sortedTags = oldTags.sort(function(a, b){
		return a.name > b.name;
	});
	let toImport = []; //initialize array to be imported.
	console.log(JSON.stringify(sortedTags,null,2).substring(0,100));
	let mTitle = sortedTags[1].value; //title of custom tag
	let mArg = sortedTags[0].value; //argument of custom tag
	console.log(mTitle,mArg);
	New.click(); //click on add new custom tag button
	document.getElementById('menuTitle').value = "blblblbl";
	let moo = document.getElementById('menuTitle').value;
	console.log("moo",moo);
//	document.getElementById("menuTitle").value = customMenu[i].menuTitle;
	document.getElementById("menuArg").value = mArg;
	console.log(document.getElementById("menuArg").value);
}

The values are being read, but the text fields are not being populated, even though it uses the identical syntax. (The click operation on “New” works fine.)

Am I missing some sort of permission problem, or is it something else, because the first code block works, and the 2nd code block does not.