Good day, i am currently working on a website that facilitates acquisition of values into a table from users. What i need to display at the end is just the sum of every column say into a text field on my front end. Is there any simple code i can use without having to be a coding guru. All in need is the simplicity one would achieve say in an excel by adding =A1+A70 and getting the total at the point which the formula was inserted.
No such thing as an Excel-like autosum button to click on in Corvid. Coding is the only option. In particular, you will need to get familiar with WixDataAggregate.
i understand that, but i am sure this is already something of a common request, would there be some similar code i could have a look at and try out, i dont even know how to start this. I read a bit on hooks but the examples are so complex i dont wanna touch the back end just anyhow
could you please explain to me how would this generate an out put of say 50 is the field “Poupanca” had 20 for line 1 and 30 for line 2, please note this table is already preloaded with 7o lines i simple want to add whichever value is added on those fields
I don’t know how you populate your table. From a collection query? from a dataset? and in any case I think that Anthony’s solution may be simpler and relatively easy to implement.
with a dataset, here is an already filled table : https://em1000x.wixsite.com/kendlemuka/kurhula password to this area is “kk” without the quotes. i havent placed a field for the result but i would use say a text box in read only mode for such
i dont know if this helps, this is the backend, i tried placing the code on the page code i also tried on a hook on the data.js i get the same error that #Esperanca is not a valid selector, i get htis wherever there is an #table1…I have added a read only text box to display the result of the sum of all Poupanca values as per the front end.
I am specifically speaking of this page, if i get this one right i will be able to prpagate the same code to all other areas. Thank again
i dont think it would look good by adding a new row, the table stays at 70 rows at all times nothing more nothing less, it will have information added to any of those 70 rows at random depending on whether the person has pitched or not. The values are always integers, without cents always full integers
First of all, don’t event try to use it on the backend. It won’t work.
Second, this error means your table property Id is not: “Esperanca”. check again.
Third, wrap the code in :
thank you, i am starting to understand the reason why table1 is used as a selector here and could clear those errors, i am now getting #totalPoupanca as an invalid selector, dont know if the fact that “Poupanca” is a Number field, thanks again
i have now defined i get an error that text dont exist on totalPoupanca most likely cause it is a number not a string. i dont think what i want is really complex to achieve. Please visit my sample page here: https://em1000x.wixsite.com/kendlemuka/esperanca
What happens here:
table has 70 lines with line 1 being loaded by default
users load numbers in every box except the date box
moving to the next line will automatically submit the values into the previous line and so on
4.The table gets updated on the fly and numbers can be updated at will
it serves the purpose of collecting the right data but we still need to export the data into an .csv file and then load on an excel that has all the formulas that autocalculate the total, like the total of Poupanca, Reembolso, FS respectivey.
All we need is to display the values of the sum of each column as the user inputs the various values