I am trying to sum values from a database and display the result in an input element. I am not sure how to go about this. I have tried the below code, but the value it is giving me is incorrect. Does anybody have suggestions on how I can properly accomplish this? I want to sum the values from the Count Items column, (field key countItems), located in the member-File database.
I am unable to get anything to display when I use reduce() instead of forEach().
To clarify, I have a table that is filtered by dropdown selections. I would like the input element (‘#input7’) to display the sum of the values in the table when a button (button12) is clicked.
I tried the above and still cannot get it to work. I have tried the below as well. It is close… it is summing everything for that email and wont display in the input element on the page.