Missing element in a repeating section


Badge +4

Hello all,

Recently we stumbled upon a strange issue - sometimes submitting a form through a mobile device (iOS) would lose one of the elements in a repeating section. The form is shown below and it is used to add amounts as needed. All amounts are summed in real time on the form. First there's a calculated field within the repeating section (formula is: "If(equals(currency,'BGN'),amount,0)" so that it adds only the chosen currency. And below the repeating section there's another calculated field that sums all corresponding currency fields.

So, the form, as seen from the capture, has calculated a larger amount (126230) while the 5 elements actually amount to a total of 105760. There has been a sixth element which is missing (not saved and submitted) but its amount somehow shows in the total.

If I open the form in edit mode the formula is being automatically recalculated correctly:

So far I have been unable to reproduce this issue (reported by users) - the test forms are always calculated correctly (as are most other forms in production).

Has anyone had that? Any ideas will be appreciated.

Thank you,

Dimiter


7 replies

Userlevel 5
Badge +14

so, first picture is from VIEW form?

have you configured calc value control to recalculate in VIEW mode? it's disabled by default.

Badge +8

Hi Dimiter‌,

Agree with Marian Hatala‌, check all the Calculated Value in the form has the below settings:

200567_pastedImage_1.png

Badge +4

Dear Marian and Chaitra,

I checked the form and the Desktop layout was indeed left at "No" for the View mode (the mobile ones were set to "Yes" although I don't think it would matter much there). I changed it and can see the new value. But the calculated field also updates a value in a column (for reference or history) and I can still see the larger one. It couldn't have gotten this if there hadn't been another element to add to the value.

And I have 4 different users who insist they have input another element on different occasions yesterday.

Badge +8

Can you cross check the form, if in case any Calculated Value field is present behind any control and not visible?

Userlevel 5
Badge +14

so, does that mean your users added/deleted rows from repeating section but total sum didn't (both saved to the list field, as well as one you have seen before you switched on recalculation in VIEW) recalculate to reflect the most recent repeating section state?

first of all I would examine repeating section's XML to see what the real current content.

reg. recalculation not being up to date I would check developer console for any errors. if there are once they can cause certain formaluas/rules/javascript code not being evaluated/executed.,

Badge +4

Yes, there are hidden controls but I made them visible and went through each formula.

Badge +4

Regarding your question I'd say the sum did recalculate correctly but as if the element is missing . The users have paper documents (from which they input the data) to confirm the correct total sum.

I will try to check the XML, that's a good idea. There are 2 fields in the section and maybe the user skipped to fill in the first one (the name) and only filled in the second (amount) which somehow messed the data up.

Reply