I need to locate and update items within a repeating area when an attribute not in the repeating area changes. Here is the script: on("change:STR-DM sheet:opened", function() { console.log("==============================="); console.log("Entering STR-DM change listener"); getAttrs(['STR-DM'],function(values) { console.log("Updating Bludgeon Weapons..."); getSectionIDs("repeating_bludgeon", function(idarray1) { console.log(" blud count: ".concat(idarray1.length)); for(var i=0; i < idarray1.length; i++) { console.log(" blud idlen:".concat(idarray1[i].length)); console.log(" blud id:".concat("|",idarray1[i],"|")); console.log(" looking for:".concat("|repeating_bludgeon_",idarray1[i],"_bludgeon-bulk-penalty|")); getAttrs(['repeating_bludgeon_' + idarray1[i] + '_bludgeon-bulk-penalty'], function(vals) { console.log("return count: ".concat(vals.length)); for(var j=0 ; j<vals.length; j++) console.log(" vals[".concat(j,"]: ",vals[j])); }) } }); }) }) And here is the console output produces when this triggers: Updating Bludgeon Weapons... blud count: 2
blud idlen:20
blud id:|-lwwxjzt9rxhsjch8r1l|
looking for:|repeating_bludgeon_-lwwxjzt9rxhsjch8r1l_bludgeon-bulk-penalty| eval" class="frame-link-source" draggable="false">
blud idlen:20
blud id:|-lwwjrw4uoowar7-dv8v| eval" class="frame-link-source" draggable="false">
looking for:|repeating_bludgeon_-lwwjrw4uoowar7-dv8v_bludgeon-bulk-penalty| eval" class="frame-link-source" draggable="false">
return count: undefined as you can see, I get the IDs of the repeating items, but attempts to retrieve an attribute using that ID fail. By looking at "eventInfo.sourceAttribute" in an "on:change" listener, I have confirmed that the string that appears in "looking for" above is a correct full name. There are also no "case" issues... the html fieldset in question is "repeating_bludgeon", and the attribute in question is "attr_bludgeon-bulk-penalty". What am I doing wrong?