I have a fieldset named repeating_weap which I am trying to populate from a dropdown selection. This is a simplified version of the sheet worker, but I am trying to populate values in the repeating section from an array of objects. The code runs, but the values in the repeating section all end up as "undefined". I think I'm close to implementing this correctly, but I'm not sure what I'm missing. on("change:thetype sheet:opened", function() { getAttrs(["thetype"], function(values) { let dsply = values.thetype; let A = {name:"1", type:"melee", weapons:[ {name:"Dagger", damage:"1-4"}, {name:"Sword", damage:"1-8"}] }; let B = {name:"2", type:"archer", weapons:[ {name:"Short Bow", damage:"1-6"}, {name:"Long Bow", damage:"1-8"}, {name:"Crossbow", damage:"1-8"}] }; let charinfo = [A,B]; for (i = 0 ; i < charinfo.length ; i++) { if (charinfo[i].name == dsply) { setAttrs({['type']: String(charinfo[i].type)}); const settings = {}; //create an object to store the new rows for (a in charinfo[i].weapons) { const newrowid = generateRowID(); settings["repeating_weap_" + newrowid + "_weaponname"] = String(a.name); settings["repeating_weap_" + newrowid + "_weapondamage"] = String(a.damage); } setAttrs(settings); } } }); });