AJAX Calculating Repeat Group

nclaypool

Member
I have a list that contains repeating data, that repeating data is comprised of numerous columns where a user enters dollar amounts into each one and a CALC field that totals them all up to the right. The parent form contains a field where a total amount is entered, then two CALC fields, one that totals up the totals from the repeat group and another that takes that total and subtracts it from the total field to show how much is left. So there's a Total, a Total Accounted, and Total Remaining.

When the Total Remaining hits zero a button is displayed that allows the user to indicate that that record is done and should be locked. This is accomplished via simple Javascript that checks the Total Remaining's value.

The problem is, because the Total Accounted and Total Remaining can't be calculated via AJAX the user is required to Save the record twice before the remaining finally catches up and the button is displayed.

I read the examples provided here: http://fabrikar.com/forums/index.ph...pdate_a_master_total_element_in_another_group

And attempted to add the CHANGE code to the repeat groups total CALC field. However, nothing happens when it is changed by data entered in the nearby columns. I also tried adding it to one of the individual columns in case Javascript wasn't counting the AJAX calculations as changes. Once again, nothing happened, I'm not even seeing JS errors in my browser's console. My confusion with the example is that each item was referring to JOIN data where I'm really only working against one JOIN field, the rest are in the parent list.

This would be amazing to figure out to prevent unnecessary saving for the user as well as a live tally of their entries so they can check their work as they go.

I would appreciate any guidance.
 
That code in the wiki is out of date. I'll try and find some time to provide a more up to date example.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top