PerfectForms Forums » General

table totals function

(5 posts)
  1. imperial
    Member

    I have a table that has a function to add the column values as each row is added to the table in order to generate a total value in a seperate field.

    The problem i have is that when a row is removed it does not re-calculate the totals to reflect this change.

    Is there a way around this?

    Posted 1 year ago #
  2. ijobling
    Member

    Look at the actual 'event' you have written this script on. if you are running this script on the 'row is added' and then are deleting a row, look at replicating the script on the 'row is deleted' or one of the other table behaviour events that will suit your requirements (a number of users present a 'calculate' button to the form for users to physically invoke the script to do the 'sum')

    Posted 1 year ago #
  3. imperial
    Member

    I have 7 columns that i need to total individually, so i have placed the behaviuor on the individual columns (numeric input changes field data)

    if i use the tables (row added or deleted behaviour) then unles another row is added, the column totals wont be populated, meaning that the last row entry will not be added to the totals.

    i have looked at the other behaviours of the table and the same event occurs, whereby if i delete a row then this is not reflected in the calculation

    any other ideas? :)

    Posted 1 year ago #
  4. ijobling
    Member

    Using the 'numeric input changes field data' won't be covering the 'delete row' event but also why handle this on each behaviour? Just have the 7 'set field' scripts under one event will do what you need to sum the fields in each of the columns, and then replicate those under the 'set table - delete row' script and it will update as they delete the row.

    Having said that, it probably may be easier if you could send over your form so we can see how you are handling this at the moment and that may show a solution for you?

    Posted 1 year ago #
  5. imperial
    Member

    its working perfectly now i have done as you have suggested. Thanks for your help.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in or register to post.

Contact

1917 Palomar Oaks Way
Suite 160
Carlsbad, CA 92008
866.900.8588

  picture  picture  picture  picture