You are viewing limited content. For full access, please sign in.

Question

Question

select fields from table and add only the selected values in laserfiche forms

asked on January 15, 2018

Hi Guys,

I need a solution to select specific values from a table full of values and add only those selected values and give the sum. Is this possible in Laserfiche Forms.

It should allow the user to select some values from a table and return him the sum of only those selected values.

0 0

Replies

replied on January 16, 2018

Hi Shibin,

It depends on how you marked those values as "selected".

If you are using a checkbox field like the screenshot below, you could do it with formula:

The calculation set on Sum field is:

=SUMIF(Table.SelectToSum.Selected, "=true", Table.Value)

1 0
replied on January 17, 2018

In a later form if i want to display only the selected values and the total only, is there a solution for that. It should not display the values that are not selected.

0 0
replied on January 17, 2018

You can use custom script to do that:

Set table class "myTable" and the checkbox field class "SelectToSum"

$(document).ready(function(){
  $('.myTable tr').each(function(){
    if ($(this).find('.SelectToSum input[value="Selected"]').is(':not(:checked)')){
      $(this).hide();
    }      
  });
});

 

0 0
replied on January 17, 2018

Thank you for the help. But this script was not working fine. But I achieved the result using field rules.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.