Skip to main content
Participant
November 8, 2024
Question

Calculate total sum of export values from selected items under list

  • November 8, 2024
  • 1 reply
  • 741 views

Dear community members,

 

Would like to seek your help for my issue here please.

 

I have created a list of items to be selected, and each item has its unique export value.

This list also allows the selection of multiple items.

 

Would like to check how can i create a calculated field, whereby this field will sum up the export value of all the items that were selected in the aforementioned list please? 

 

Greatly appreciate your tips as im new to adobe form and am trying to create this form to help my colleagues. Thanks!

This topic has been closed for replies.

1 reply

PDF Automation Station
Community Expert
Community Expert
November 8, 2024

Is it a list box field?

Participant
November 8, 2024

yes it it a list box field. Thanks!

PDF Automation Station
Community Expert
Community Expert
November 8, 2024
var result=this.getField("List Box").value;
var sum=0;
if(typeof(result)=="number")
{event.value=result}
else
{
for(var i=0;i<result.length;i++)
{
sum+=Number(result[i]);
}
event.value=sum;
}