This is probably mainly a question for GIG as it concerns the sheetworker code he developed and has so kindly shared. Posting it here as perhaps others might have an insight too, and the answer might help other people too. I'm using the repeatingSum sheetworker as shared via the community wiki ( RepeatingSum - Roll20 Wiki ) to do some adding up of my repeating section. What I'm not sure if it can do, and if so how to do it is the following: I have multiple values that need to be calculated, and each destination value is the result of the multiplication of two values/columns in the repeating section (one armour value and one checkbox). In addition, some other columns are used across all destination values ( "is carried" and "weight"). In the example given of using an array to handle multiple destinations, the value array has one matching input column for each destination. So I'm not sure how to write the executing sheetworker to map two input columns to one destination value for an array of destination values. Is this even possible, and if so, what is the sytax? Thanks in advance for your time reading and any feedback provided! Context of what I'm trying to do: The roleplay system the sheet supports (Harnmaster 3) defines armor as covering one or more locations (out of 16 locations on the body). For each location covered it provides 4 different armour values, indicating protecting against 4 different attack types (blunt, edge, pierce and fire/frost respectively).Each armour item can be worn ( ïs carried" is checked) or just listed in the inventory. When an item is carried, the armour value per protection type needs to be added up per location. This looks likes this on the sheet: Input End result: (note the description fields in the screenshot are not generated based on the input, just manually added by the player) Code I've got now: I know this is messy so I was trying to clean it up by merging this into one line if possible: on('change:repeating_armoritems remove:repeating_armoritems', function() {
repeatingSum('sk_b', 'armoritems',['armor_sk_bvalue', 'armor_loc_sk','armor_iscarried']);
repeatingSum('sk_e', 'armoritems',['armor_sk_evalue', 'armor_loc_sk','armor_iscarried']);
repeatingSum('sk_p', 'armoritems',['armor_sk_pvalue', 'armor_loc_sk','armor_iscarried']);
repeatingSum('sk_f', 'armoritems',['armor_sk_fvalue', 'armor_loc_sk','armor_iscarried']);
repeatingSum('fa_b', 'armoritems',['armor_fa_bvalue', 'armor_loc_fa','armor_iscarried']);
repeatingSum('fa_e', 'armoritems',['armor_fa_evalue', 'armor_loc_fa','armor_iscarried']);
repeatingSum('fa_p', 'armoritems',['armor_fa_pvalue', 'armor_loc_fa','armor_iscarried']);
repeatingSum('fa_f', 'armoritems',['armor_fa_fvalue', 'armor_loc_fa','armor_iscarried']);
repeatingSum('nk_b', 'armoritems',['armor_nk_bvalue', 'armor_loc_nk','armor_iscarried']);
repeatingSum('nk_e', 'armoritems',['armor_nk_evalue', 'armor_loc_nk','armor_iscarried']);
repeatingSum('nk_p', 'armoritems',['armor_nk_pvalue', 'armor_loc_nk','armor_iscarried']);
repeatingSum('nk_f', 'armoritems',['armor_nk_fvalue', 'armor_loc_nk','armor_iscarried']);
repeatingSum('sh_b', 'armoritems',['armor_sh_bvalue', 'armor_loc_sh','armor_iscarried']);
repeatingSum('sh_e', 'armoritems',['armor_sh_evalue', 'armor_loc_sh','armor_iscarried']);
repeatingSum('sh_p', 'armoritems',['armor_sh_pvalue', 'armor_loc_sh','armor_iscarried']);
repeatingSum('sh_f', 'armoritems',['armor_sh_fvalue', 'armor_loc_sh','armor_iscarried']);
repeatingSum('ua_b', 'armoritems',['armor_ua_bvalue', 'armor_loc_ua','armor_iscarried']);
repeatingSum('ua_e', 'armoritems',['armor_ua_evalue', 'armor_loc_ua','armor_iscarried']);
repeatingSum('ua_p', 'armoritems',['armor_ua_pvalue', 'armor_loc_ua','armor_iscarried']);
repeatingSum('ua_f', 'armoritems',['armor_ua_fvalue', 'armor_loc_ua','armor_iscarried']);
repeatingSum('el_b', 'armoritems',['armor_el_bvalue', 'armor_loc_el','armor_iscarried']);
repeatingSum('el_e', 'armoritems',['armor_el_evalue', 'armor_loc_el','armor_iscarried']);
repeatingSum('el_p', 'armoritems',['armor_el_pvalue', 'armor_loc_el','armor_iscarried']);
repeatingSum('el_f', 'armoritems',['armor_el_fvalue', 'armor_loc_el','armor_iscarried']);
repeatingSum('fo_b', 'armoritems',['armor_fo_bvalue', 'armor_loc_fo','armor_iscarried']);
repeatingSum('fo_e', 'armoritems',['armor_fo_evalue', 'armor_loc_fo','armor_iscarried']);
repeatingSum('fo_p', 'armoritems',['armor_fo_pvalue', 'armor_loc_fo','armor_iscarried']);
repeatingSum('fo_f', 'armoritems',['armor_fo_fvalue', 'armor_loc_fo','armor_iscarried']);
repeatingSum('ha_b', 'armoritems',['armor_ha_bvalue', 'armor_loc_ha','armor_iscarried']);
repeatingSum('ha_e', 'armoritems',['armor_ha_evalue', 'armor_loc_ha','armor_iscarried']);
repeatingSum('ha_p', 'armoritems',['armor_ha_pvalue', 'armor_loc_ha','armor_iscarried']);
repeatingSum('ha_f', 'armoritems',['armor_ha_fvalue', 'armor_loc_ha','armor_iscarried']);
repeatingSum('tx_b', 'armoritems',['armor_tx_bvalue', 'armor_loc_tx','armor_iscarried']);
repeatingSum('tx_e', 'armoritems',['armor_tx_evalue', 'armor_loc_tx','armor_iscarried']);
repeatingSum('tx_p', 'armoritems',['armor_tx_pvalue', 'armor_loc_tx','armor_iscarried']);
repeatingSum('tx_f', 'armoritems',['armor_tx_fvalue', 'armor_loc_tx','armor_iscarried']);
repeatingSum('ab_b', 'armoritems',['armor_ab_bvalue', 'armor_loc_ab','armor_iscarried']);
repeatingSum('ab_e', 'armoritems',['armor_ab_evalue', 'armor_loc_ab','armor_iscarried']);
repeatingSum('ab_p', 'armoritems',['armor_ab_pvalue', 'armor_loc_ab','armor_iscarried']);
repeatingSum('ab_f', 'armoritems',['armor_ab_fvalue', 'armor_loc_ab','armor_iscarried']);
repeatingSum('hp_b', 'armoritems',['armor_hp_bvalue', 'armor_loc_hp','armor_iscarried']);
repeatingSum('hp_e', 'armoritems',['armor_hp_evalue', 'armor_loc_hp','armor_iscarried']);
repeatingSum('hp_p', 'armoritems',['armor_hp_pvalue', 'armor_loc_hp','armor_iscarried']);
repeatingSum('hp_f', 'armoritems',['armor_hp_fvalue', 'armor_loc_hp','armor_iscarried']);
repeatingSum('gr_b', 'armoritems',['armor_gr_bvalue', 'armor_loc_gr','armor_iscarried']);
repeatingSum('gr_e', 'armoritems',['armor_gr_evalue', 'armor_loc_gr','armor_iscarried']);
repeatingSum('gr_p', 'armoritems',['armor_gr_pvalue', 'armor_loc_gr','armor_iscarried']);
repeatingSum('gr_f', 'armoritems',['armor_gr_fvalue', 'armor_loc_gr','armor_iscarried']);
repeatingSum('th_b', 'armoritems',['armor_th_bvalue', 'armor_loc_th','armor_iscarried']);
repeatingSum('th_e', 'armoritems',['armor_th_evalue', 'armor_loc_th','armor_iscarried']);
repeatingSum('th_p', 'armoritems',['armor_th_pvalue', 'armor_loc_th','armor_iscarried']);
repeatingSum('th_f', 'armoritems',['armor_th_fvalue', 'armor_loc_th','armor_iscarried']);
repeatingSum('kn_b', 'armoritems',['armor_kn_bvalue', 'armor_loc_kn','armor_iscarried']);
repeatingSum('kn_e', 'armoritems',['armor_kn_evalue', 'armor_loc_kn','armor_iscarried']);
repeatingSum('kn_p', 'armoritems',['armor_kn_pvalue', 'armor_loc_kn','armor_iscarried']);
repeatingSum('kn_f', 'armoritems',['armor_kn_fvalue', 'armor_loc_kn','armor_iscarried']);
repeatingSum('ca_b', 'armoritems',['armor_ca_bvalue', 'armor_loc_ca','armor_iscarried']);
repeatingSum('ca_e', 'armoritems',['armor_ca_evalue', 'armor_loc_ca','armor_iscarried']);
repeatingSum('ca_p', 'armoritems',['armor_ca_pvalue', 'armor_loc_ca','armor_iscarried']);
repeatingSum('ca_f', 'armoritems',['armor_ca_fvalue', 'armor_loc_ca','armor_iscarried']);
repeatingSum('ft_b', 'armoritems',['armor_ft_bvalue', 'armor_loc_ft','armor_iscarried']);
repeatingSum('ft_e', 'armoritems',['armor_ft_evalue', 'armor_loc_ft','armor_iscarried']);
repeatingSum('ft_p', 'armoritems',['armor_ft_pvalue', 'armor_loc_ft','armor_iscarried']);
repeatingSum('ft_f', 'armoritems',['armor_ft_fvalue', 'armor_loc_ft','armor_iscarried']);
});
full sheet code here: roll20-character-sheets/HarnMaster3/harnsheet.html at master · Roll20/roll20-character-sheets (github.com) (note: this doesn't include weight yet, which is calculated in a separate sheetworker but I'll also merge that in here, I understand how to do that) (note2: if what I've asked is not possible I do realise I can at least condens this into a quarter of the lines by merging each location and calculate the armour values array per location).