Constrain a user-supplied total to make sure it adds up to the sum of other entered values

I am working on a xlsfrom and facing a problem in my form.

|p3| - How many goats do you have in your herd?|
|p3_a| - Total number|
|p3_b| - No. of Bucks|
|p3_c| - No. of Does|
|Total| - Total of No.Bukcs and No.Of Does|

I want that Total must equal to p3_a when calculating p3_b with p3_c.

Can you please help me on this?

Thank you
Naseem

below the integers add a "note" and at relevant put this function and make note required
coalesce(${p3_c},0)+coalesce(${pc_b},0)!=${pc_a}

1 Like

calculation.xlsx (10.7 KB)
try this

Thank you but it is not working. I am attaching the form here if you can fix the problem?

OXFAM_DB_Final_version_3.xls (345.5 KB)

Hi @naseem.akbarzai

please try this out: textC.xlsx (6.3 KB)

Cool! I never knew about coalesce(...), till now :slight_smile:

2 posts were split to a new topic: How can I convert different choices to numeric values?