Adaptive form calculate expression for multiple instances

Avatar

Avatar

SiriKK

Avatar

SiriKK

SiriKK

28-07-2020

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;

calculated expression instance manager instances

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

SiriKK

Avatar

SiriKK

SiriKK

03-08-2020

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

 

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

Answers (1)

Answers (1)

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

15-10-2020

@SiriKK  We will get this documented.