I have a form with two subforms and two 'Calc' fields in the main form with 'nuTotal' for each subform.
I also have a third 'Calc' field with a difference for the subform 'nuTotal' fields
If this third field is placed in the 'Arrange object' field list above any 'nuTotal' field, a strange situation occurs: I mark a line in one subform for deletion, the 'nuTotal' field for that subform reflects the deletion, but the overall calculation field remains unchanged. When I remove the deletion mark for the same row - the subform calculation field works correctly, but the overall calculation field changes the value as if the undeleted row was deleted.
Possible workaround - place calc fields as low as possible and most dependent field should be lowest.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Possible bug in calc field
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Possible bug in calc field
It seems that the issue is related to the order in which calculations are being performed. The overall calculation field is not being updated because it is placed higher in the 'Arrange object' field list than the 'nuTotal' fields. When you mark a line for deletion, the 'nuTotal' field updates, but the overall calculation field remains unchanged because it was already calculated before the 'nuTotal' fields were updated.
To work around this issue, you can try the following steps:
Arrange the calc fields in the correct order of dependency. Place the 'nuTotal' fields first, followed by the overall calculation field. This will ensure that the overall calculation field updates after the 'nuTotal' fields have been updated. (This is what you already did, if I understand correctly)
You can also consider using the nuCalculated event for the 'nuTotal' fields to trigger a recalculation of the overall calculation field. This will ensure that the overall calculation field is updated whenever a 'nuTotal' field is changed.
To work around this issue, you can try the following steps:
Arrange the calc fields in the correct order of dependency. Place the 'nuTotal' fields first, followed by the overall calculation field. This will ensure that the overall calculation field updates after the 'nuTotal' fields have been updated. (This is what you already did, if I understand correctly)
You can also consider using the nuCalculated event for the 'nuTotal' fields to trigger a recalculation of the overall calculation field. This will ensure that the overall calculation field is updated whenever a 'nuTotal' field is changed.