Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

calculate function in repeating subform (multiple repeated tables)

Avatar

Former Community Member

I work at a university (see below) and I am using Adobe Livecycle Designer ES 8.2 to create forms. I have a problem with this form which I need some help with. My problem is in the CourseStructureDetailsSubform, most particularly in the SubjectDetailsTable and the CreditDetailsTable.

I need to be able to repeat the whole section, and to have different outcomes in the CreditDetailsTable if the entries vary in the SubjectDetailsTable.

 

This is how I have added the new, repeating section:

form1.CourseStructureSubform.CourseStructureDetailsSubform.AddRemoveTable.Row1.Subform19.Button33::click - (JavaScript, client)

CourseStructureDetailsSubform.instanceManager.addInstance(1);

The Total Credit Points item is supposed to be a sum of the column above it and is then used in the credit details table..

this is the calculation text:

 

form1.CourseStructureSubform.CourseStructureDetailsSubform.SubjectDetailsTable.FooterRow.TotalCreditPoints::calculate - (JavaScript, client)

sum(SubjectDetailsTable.Row1[*].Points[*])

This sum is then used (using global binding on the field name) in the CreditDetailsTable.  I can’t get it to let me use different information – it keeps overwriting so they are all the same

This is an example of one of the things it is supposed to do:

form1.CourseStructureSubform.CourseStructureDetailsSubform.CreditDetailsTable.Row1.MaxCreditTable.Row1.MaxSubjects::calculate - (FormCalc, client)

(MaxCreditTable.Row1.TotalCreditPoints)

/15;

I feel like such an idiot, I can't even work out how to attach the file so someone can see it, which you will need to do to help me at all!!

EG: I might have 3 rows in the SubjectDetailsTable summing to 75 points in the TotalCreditPoints field.

Then I add the whole section a second time and have 4 rows in the SubjectDetailsTable totaling 135 in the TotalCreditPoints field. The second value either overwrites the first or the first overwrites the second. (It varies, depending on all my other attempts to change things). Anyway, I took out all of the global binding etc and the sum facility and still can’t get the CreditDetailsTable to use multiple inputs into the field  labeled 3.6a.

I am pretty sure that this has something to do with needing to create an index or a count to change the inputs to allow for each instance of the subform (something like “this.rawValue=this.parent.value+1”) but I don’t know what should be indexed or counted and what those terms actually mean. I am pretty much self taught and usually the forum gives me great answers but I can’t work out anything for this. (Apart from helping with this problem, is there a decent on-line tutorial on Javascript/formcalc you could recommend?)

Any suggestions? I am happy to send the file if someone will help me work out how to attach it!! Please help!!! (Too many exclamation points but I am getting desperate)

0 Replies