I am looking to increment the number of uses of a trait when I roll a special type of roll. The traits are added in repeating sections. To roll this, an inline button within the repating section calculates the roll, and should then add one use to the TraitUses attr. This is all in a custom ccharacter sheet. The button is the one with 'CP'. Here is the code for the button, with the use of the API. <button type='roll' value='&{template:exp}{{name=@{charactername}}}{{roll_name=@{TraitName}}}{{attr=[[1d20 + [[1 + floor(@{TraitUses}/15)]] ]]}} {{combo=[[@{TraitDice} * [[0 + ceil(@{cp}/100)]] ]]}} !modbattr --name @{charactername} --cp|{{cp=CP changes by [[-1]]}} --TraitUses|{{TraitUses=Uses changes by [[1]]}}!!! {{cp=Used}} {{crit=[Critical Hit](~@{charactername}|Crit)}}' name='roll_TraitCheck'> <b>CP</b></button> Uses:<input type="number" name="attr_TraitUses" value= "0"/> This is the use of the API. It doesn't read the attr as within the repeating section. TraitUses is the problematic one. !modbattr --name @{charactername} --cp|{{cp=CP changes by [[-1]]}} --TraitUses|{{TraitUses=Uses changes by [[1]]}}!!! But the button itself does, as it uses the following for a simple calculation. {{attr=[[1d20 + [[1 + floor(@{TraitUses}/15)]] ]]}} Here it reads the attr as within the repeating secction and calculates correctly. I cannot use the actual ID of the repeating trait, as it will be different for each one. Is there a way to get the API to read the repeating section attr from within? Edit) What it currently does is add a new general attr called TraitUses and increments that. I have tried many ways but found nothing.