Skip Navigation LinksHome Page > Forums > Rapise Forums > Rapise Issues & Questions > How to get a series of nu...
I'm facing some difficulties in one case I have in my web app I'm currently working with, where there are multiple rows containing number values changing dynamically time after time, and there is TOTAL which is supposed to calculate all these numbers I mentioned above.I want to create a script that will get the values of these numbers every time I run it, add between them and compare to the Total row.
Any help on this?
Hi Jurial,
To get the values of each row, you can LEARN the table object in Rapise and then use something like:
var rows = SeS("object").DoDOMQueryXPath('//tr'); for (var i = 0; i < rows.length; i++) { var cell = rows[i].DoDOMQueryXPath('td[x]')[0]; var val = Math.parseInt(cell.GetNodeText()); }
to get the value of each cell as a number. Then use the same GetNodeText() on the total row, and compare using standard JavaScript functions.
You could also do it in RVL in a similar way.
Regards
Jim
And if you have any questions, please email or call us at +1 (202) 558-6885