Design Dabbler

## Help with Easy Form Validation Rule to Require Field Based on 2 Other Fields

Nintex 2013 Form Designer

This should be so easy but for some reason I can't figure it out.

Basically, I have a form that should require a "Parent" field to be greater than "0" if there is more than one Child Row (repeating section) and a field in that Child Row is greater than "0".

So, If Child row >1, and any child row includes a Total Settlement Risk (TSR) limit >0, then Parent Total Settlement Risk (TSR) limit must be >0.

In regular English, if any of the TSR’s for the children (when there are two or more child rows) are not zero, then the parent TSR cannot be zero and must have a value that is not zero.

My idea was to write the formula like this:

If(totalChildren>1 && childTSR>0, {self}=="0") but that doesn't work 😞

I'm using this rule now, which works, but it's only 1/2 of what I need: If(totalChildren>1, {Self}=="0")

Ribbon Ruler

## Re: Help with Easy Form Validation Rule to Require Field Based on 2 Other Fields

You could use the Sum Function around the named control for your child TSR to calculate the sum of all childTSRs, meaning if it is > 0 then one must be more than 0. Sum will summarize all the fields with the name of childTSR.

So the formula could be something like

If(totalChildren>1 && Sum(childTSR) > 0, {self}=="0")

Would that help?