on ‎2021 Jun 25 2:52 PM
Hi everyone,
How can I count rows in table in SFP using JavaScript code? I am using xfa.resolveNodes function as I've seen somewhere else, but it only returns value "1", even if the table has much more rows.


I know that I can do this by counting rows in interface, but I wanted to do this using JavaScript directly on form's layout. Did I choose wrong event or something? Or maybe I am using wrong path in resolveNodes?
I'd be grateful for all help.
Request clarification before answering.
First of all change layouts.ready -> Events with script.
Write down the below code.-
xfa.resolveNode("GV_ITEM_COUNT").rawValue = xfa.resolveNodes("$record.IT_PO_ITMEMS.DATA[*]").length
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.