Mark Daniel
Posts: 0
Joined: Tue Jul 21, 2015 11:13 pm

Help with summing the values of a single column within a table

Hi,

I love Apperyio. I have successfully created an entire app, but am completely stuck on the very last feature. You have provided examples of how to sum the values of a column within a table in other posts, but I am having a lot of trouble getting this to work.

1) I have a collection named "meal"
2) This has four columns "_id", "name" (string), "caloriesSaved" (number), "fatSaved" (number)
3) I am using a meal_list_service to populate a list of the "names" of each meal in the collection.

This is all works great. However, I need help with the last thing:
4) I would like to populate a label named "totalCaloriesSaved" with the sum of all the values in the "caloriesSaved" column.

Thank you so much for any possible help - as you can tell, I am very new and inexperienced with coding, but have LOVED using Apperyio as it has allowed me to build a beautiful app nonetheless.

Thank you again,
Mark

Return to “Issues”