This is where the getSectionIDs function comes in. There's a couple of odd things about your sheet worker. Is professionbonuscalcmode a checkbox? If so it can only have a value of 1 or 0; but you have a third branch on your if(check) if statement. More importantly, you have a potentially big problem with the repeating_skills_prof_skillname attribute. You have it in the change event line, and also in the setAttr line. This means you have an infinite loop here: when this line runs: const profbonus = prof*level; the value will change. That will trigger the on(change) line, and the sheet worker will run again - then the above line will run again, then the new value will be saved, then the event will trigger again, and the sheet worker will run again... This will run until the sheet worker crashes, and if level is above 1, the profbonus will skyrocket up to infinity. You cant have an attribute update itself in this way. With that in mind, I present a sheet worker modified from your last post that handles multiple rows. IMPORTANT: this is not the sheet worker to use. It has the critical error of the infinite loop I just described. I am posting it just to show you the structure. I don't know what exactly is meant to happen here and don't know your sheet, so I dont have the information needed to suggest a correction to fix the error. on ( 'change:repeating_skills:prof_skillname change:professionbonuscalcmode change:niveau' , () => { getSectionIDs ( 'repeating_skills' , ids => { // get an array of anmes for the skillname attribute across all rows. // getSectionIDs gives an array of the row ids. const fieldnames = []; ids . forEach ( id => fieldnames . push ( `repeating_skills_ ${ id } _prof_skillname` )); // now getAttrs can use that array to get the attributes from all rows getAttrs ([... fieldnames , 'niveau' , 'professionbonuscalcmode' ], values => { // get the values of the attributes outside the repeating section const level = parseInt ( values . niveau ) || 0 ; const check = parseInt ( values . professionbonuscalcmode ) || 0 ; // create a variable to hold all the stats that need to be updated const output = {}; // now loop through the row ids again ids . forEach ( id => { // get the value of the prof_skillname attribute for this specific row. const prof = parseInt ( values [ `repeating_skills_ ${ id } _prof_skillname` ]) || 0 ; // check to see if calculation is 1 or 0. Use triple equality to match properly. if ( check === 0 ) { const profbonus = prof * level ; output [ `repeating_skills_profbonus_skillname: profbonus` ] = profbonus ; } else if ( check === 1 ) { const profbonus = prof ; output [ `repeating_skills_profbonus_skillname: profbonus` ] = profbonus ; } }); // save the collected attributes. setAttrs ( output ); }); }); });