It occurs to me after the fact, that if you can only have one equipped weapon at a time, you might store the dice roll outside the repeating section, to make it easier to access. The above worker automatically fills in the weapon roll for every weapon. You might want to install a default, like this: <input type="hidden" name="attr_psydice3" value="1d100cs>0cf>91"/> And have another input outside the repeating section like <input type="hidden" name="attr_psydice3_equipped" value="1d100cs>0cf>91"/> (Change its name to whatever is appropiate). Then the sheet worker would be adjusted, to something like this: on ( "change:repeating_psypowers3:epr3 change:psyrating sheet:opened" , function ( event ) { const rowID = event . triggerName . split ( '_' )[ 2 ]; getSectionIDs ( 'repeating_psypowers3' , function ( ids ) { const fields = []; ids . forEach ( function ( id ) { fields . push ( `repeating_psypowers3_ ${ id } _epr3` ); }); getAttrs ([... fields , "psyrating" ], function ( values ) { var psyrating = parseInt ( values [ "psyrating" ]); var output = {}; output . psydice3_equipped = "1d100cs>0cf>91" ; ids . forEach ( function ( id ) { var epr = parseInt ( values [ `repeating_psypowers3_ ${ id } _epr3` ]); if ( psyrating > epr ) { output [ `repeating_psypowers3_ ${ id } _psydice3` ] = "1d100cs101cf>91" ; } else if ( psyrating == epr ) { output [ `repeating_psypowers3_ ${ id } _psydice3` ] = "1d100cs11cs22cs33cs44cs55cs66cs77cs88cs99cs100cf>91" ; } else { output [ `repeating_psypowers3_ ${ id } _psydice3` ] = "1d100cs>0cf>91" ; } if ( rowID == id ) { if ( psyrating > epr ) { output . psydice3_equipped = "1d100cs101cf>91" ; } else if ( psyrating == epr ) { output . psydice3_equipped = "1d100cs11cs22cs33cs44cs55cs66cs77cs88cs99cs100cf>91" ; } else { output . psydice3_equipped = "1d100cs>0cf>91" ; } } }); setAttrs ( output ); }); }); }); This means that you can always get the dice for whichever is equipped by using @{psydice3_equipped} - you don't have to mess about with repeating section syntax. If a weapon is equipped, it'll use the correct value, and if no weapon is equipped, it'll use the else value.