The way to do this is to create a copy of the attribute's value in a new attribute within the repeating section, using a sheet worker.
Say, create an attribute called will_copy in the repeating section, and then have an sheet worker like this.
on('change:will', () => {
getAttrs(['will'], v => {
getSectionIDs('repeating_gear', ids => {
const output = {};
ids.forEach(id => output[`repeating_gear_${id}_will_copy`] = v.will);
setAttrs(output);
});
});
});
If you have a bunch of attributes you want to copy in repeating sections, thats not very efficient. In that case, fololow these steps:
Make sure the copies of the attributes in each section have the same name, with _copy appended to them
Create an object variable in your sheet worker script block like this:
const repeatingCopies = {
gear: ['will', 'strength'],
powers: ['will', 'charisma'],
};
You have the repeating section name (without the repeating_ part) on the left, and an array of the attributes you want copied into that section on the right. So whenever you want to add a copy of an attribute to a repeating section, just update the structure above, and the sheet worker side will be handled automatically.
This is the only section of the code you need to adjust.
Finally copy this code and place it beneath the above object. You do not need to modify this.
Object.keys(repeatingCopies).forEach(section => {
repeatingCopies[section].forEach(copy => {
on(`change:${copy}`, () => {
getAttrs([copy], v => {
getSectionIDs(`repeating_${section}`, ids => {
const output = {};
ids.forEach(id => output[`repeating_${section}_${id}_${copy}_copy`] = v[copy]);
setAttrs(output);
});
});
});
});
});
This code could be made a lot more efficient, but honestly isn't likely to affect the sheet performance. It'll ensure that whenever an attribute that has a copy inside a repeating section is changed, all its copies change.