For those having a similar issue...after doing some research, I realized I had to use xfa.resolveNode() function to fix the issue I was having.
As you can see I used the form:ready event to loop through the table body and update the cell dynamically based on the length of the table body. I'm leaving a pic of my Hierarchy tree (just in case it's easier to undertand the function I wrote.)