table totals function

Home Forum General table totals function

This topic contains 4 replies, has 0 voices, and was last updated by  imperial 9 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #479

    imperial
    Participant

    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?

    #5230

    ijobling
    Participant

    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’)

    #5231

    imperial
    Participant

    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?

    #5233

    ijobling
    Participant

    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?

    #5234

    imperial
    Participant

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

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.