Table Row count question

3DMA3DMA Member, PRO Posts: 162
edited July 2014 in Working with GS (Mac)

Hello,

maybe someone has a hint on how to archive this:

I want to display the amount of rows in a table.
I imagine something like "count rows in table X where column 1 is NOT 0"

The thing is, i have an empty Table with 50 Rows, where column a is integer. So default value there is 0. After i parse a JSON from my Server, sometimes it adds several Lines of Datas where the first column is a unique ID. The amount of received rows varies every time. So all i need to know now is how do i count the rows, that actually have an value greater then 0 in the first column and display this number?

I´m sure it´s a quiet simple thing, but i just can´t figure it out lol...

I tried the loop over table and created an integer game attribute where i wanted to add "+1" for every loop where it finds a row that has above mentioned condition... but somehow it won't do the job, as i can't figure out how to add those criteria to the loop behaviour....

Any hint would be much appreciated...

Thank you

Comments

Sign In or Register to comment.