Sum all table column cell values?
iPavel
Member Posts: 24
Hi there,
I am searching and beating my head over this all day...
I need to find a way to sum all cell values from a table column, BUT when the number of rows is unknown.
Can somebody help?
Thanks in advance!
I am searching and beating my head over this all day...
I need to find a way to sum all cell values from a table column, BUT when the number of rows is unknown.
Can somebody help?
Thanks in advance!
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi @iPavel
Make a boolean attribute called Trigger, integer attribute for Count, and the integer for the sum:
When Trigger is false
When yourStartAddingboolean is true
Change Attribute Count to Count+1
Change Attribute Sum to Sum+tableCellValue(YourTable,Count,1)
Change Attribute Trigger to true
-----
When Count = tableRowCount(YourTable)
Change Attribute yourStartAddingboolean to false
-----
When Trigger is true and yourStartAddingboolean is true
Change Attribute Trigger to false
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
However @gyroscope thanks a lot !!