I have a parent table (Production). The child table is (Grades). I am entering % of production for each grade in a portal. So how to best ensure the total percent of all grades is not more than 100%?
When the portal first goes over 100% the validation doesn't kick in even when I change Production records. I then change the % of a grade so the total is back under 100% and the validation error kicks. I cant change % of grade to a lower value. It has to be deleted. I am watching If(Sum(PROD::cGradePercTot)<100;1;0) in the data viewer and it is providing the right boolean result.
I thought validation by the field was most robust or should I script validation? Thank you!!
It's hard to use Validation options on a parent record against children. Validation requires a stored non-calculation field. You can use a number result with an auto-enter calculation to validate, but it won't update without some scripted intervention.
I think you'd be better off scripting the whole thing. Probably an OnRecordCommit triggered script.