Showing error message only when the calculation is not true!

Hey, I am trying to add validation criteria for hidden questions that will not appear unless they have been chosen. Then, among the selected answers, the calculation should be equal to the total of the first question, or should appear an error message if the calculation is not equal to the total.

Unfortunately, I couldn’t upload an attachment for showing you the test I am working on so I upload a photo for your kind review.

Welcome to the community, @Shahem.t! You should now be able to upload your XLSForm. Please try to share only the relevant part of your XLSForm so that the community does not need to spend an entire time getting acquainted with your form.

Test.xlsx (12.1 KB)

Thanks @Kal_Lam, I have added the attachment as recommended,

I am facing a problem with the constraint formula that I added. my question is how to make sure that the total number of locations 1, 2, 3 are equal to the area knowing that the locations don’t appear unless you select them from multiple selections. so it may locations 1 and 3 have only been selected but still, the total should be equal to the area, and the error message will not appear unless the total doesn’t match the area.