This topic contains 4 replies, has 0 voices, and was last updated by imperial 10 years, 10 months ago.
- AuthorPosts
- April 28, 2010 at 12:46 pm #479
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?
April 28, 2010 at 1:25 pm #5230Look 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’)
April 28, 2010 at 1:40 pm #5231I 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?
April 28, 2010 at 2:01 pm #5233Using 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?
April 28, 2010 at 2:30 pm #5234its working perfectly now i have done as you have suggested. Thanks for your help.
- AuthorPosts
You must be logged in to reply to this topic.