In my repeating section, I have a value I want to display. I don't have much space though, so I want to use that value as the label for a button. Unfortunately, the value is stored as an Int and needs to have a unit attached in order to make sense to the user. So I added another attribute in the same repeating section, and wrote a function to take the value from one attribute, concatonate a label onto it, and store it in the new attribute, which I'll then use as the button label. Unfortunately, I'm pretty sure that what's happening is that the concatonated value is being stored outside the repeating section. So instead of one for every instance of the repeating section, there is only one value. So, I'm working on fixing it, but the examples I have in my code and that I've found in the forums are quite a bit more complicated than what I'm trying to do, so I haven't made sense of them yet. This is the code. It is running, so I don't think there's a need to include the repeating section itself here, because all of the information needed is already in the code below. // add resource labels
on('change:repeating_defenses:defense_action_points_clean', () => {
getAttrs(['repeating_defenses_defense_action_points_clean'], values => {
const def_act_pnts = "AP: " + int(values.repeating_defenses_defense_action_points_clean);
console.log(
'add resource labels' + '\n',
'defense_action_points: ' + def_act_pnts
);
setAttrs({defense_action_points: def_act_pnts});
});
});