Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Adding Field From Repeating Subform Different Parent Subforms

Avatar

Level 2
I need the sum of a field located within a repeating (addInstance) subform to total in another subform, however they have different parent subforms. I have been able to calculate the total in separate subforms, however they have all had the same parent subform. I am trying to use:



if (exists(subform1[0].field1)==1) then

Sum(subform1[*].field1)

endif



- What am I doing incorrectly?
1 Reply

Avatar

Level 2
To be more specific the total field is not updating. I tried using

app.setTimeOut("totalField.execCalculate()",1);



but it still doesn't add anything to the total past the initial instance.