Adaptive form calculate expression for multiple instances | Community
Skip to main content
SiriKK
New Participant
Jul 28, 2020 2:21 PM UTC
Solved

Adaptive form calculate expression for multiple instances

How do you call each instance and get the numeric value to calculate a total value? I'm stuck at identifying the syntax for each instance's value - here's the script for the calculated field:

 

var f = guideRootPanel.tblAgencies.Agency.instanceManager.instanceCount;
var total = 0;
for (var i=0; i < f; i++) {
total = total + guideRootPanel.tblAgencies.Agency(i).ContractID.value;
}
this.value = total;

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SiriKK
SiriKKAccepted solution
New Participant
Aug 3, 2020 7:03 PM UTC

Our team found the answer in case this helps someone else:

 

total = total + Agency.instanceManager.instances[i].ContractID.value;

2 replies

Mayank_Gandhi
Employee
Oct 15, 2020 11:43 AM UTC

@sirikk  We will get this documented.

Translate
SiriKK
SiriKKAuthorAccepted solution
New Participant
Aug 3, 2020 7:03 PM UTC

Our team found the answer in case this helps someone else:

 

total = total + Agency.instanceManager.instances[i].ContractID.value;

Translate