Setting up multiple validation in a roster

Hope all doing well, I am stuck now in some of the roster validation. As follows

  1. The first member should be the household head ( I did this ) but here in the same field, the second validation spouse should not be selected if the head is not married or vice versa spouse only be selected when the head is married.

  2. My second question is, I have a field outside the roster that should equal the roster field. (Like the questions asked 1. male above the age of >=18 2. female above the age of =>18 3. girls below the age of <18. 4. boys blow the age of <18. So, all these will validate when the last person entered in the roster if all the above categories are not matched then shows the error message. this should be validated with age brackets

  3. 3rd question is related to the text field I have the respondent’s name which is asked prior to or outside of the roster so I just want that if the name is not matched within any position or iteration then give the error message that the respondent name must be part of the household.

  4. If the gender of the head is selected male then the spouse should be female or vice versa head is female then the spouse should be male.

In this regard, I need your help as always your support to the users.
Thanks
.

Hope doing well, I am stuck now in some of the roster validation. As follows

  1. The first member should be the household head ( I did this ) but here in the same field, the second validation spouse should not be selected if the head is not married or vice versa spouse only be selected when the head is married.

  2. My second question is, I have a field outside the roster that should equal the roster field. (Like the questions asked 1. male above the age of >=18 2. female above the age of =>18 3. girls below the age of <18. 4. boys blow the age of <18. So, all these will validate when the last person entered in the roster if all the above categories are not matched then shows the error message. this should be validated with age brackets

  3. 3rd question is related to the text field I have the respondent’s name which is asked prior to or outside of the roster so I just want that if the name is not matched within any position or iteration then give the error message that the respondent name must be part of the household.

  4. If the gender of the head is selected male then the spouse should be female or vice versa head is female then the spouse should be male.

In this regard, I need your help as always your support to the users.
Thanks
.

Hope all doing well, I am stuck now in some of the roster validation. As follows

  1. The first member should be the household head ( I did this ) but here in the same field, the second validation spouse should not be selected if the head is not married or vice versa spouse only be selected when the head is married.
  2. My second question is, I have a field outside the roster that should equal the roster field. (Like the questions asked 1. male above the age of >=18 2. female above the age of =>18 3. girls below the age of <18. 4. boys blow the age of <18. So, all these will validate when the last person entered in the roster if all the above categories are not matched then shows the error message. this should be validated with age brackets
  3. 3rd question is related to the text field I have the respondent’s name which is asked prior to or outside of the roster so I just want that if the name is not matched within any position or iteration then give the error message that the respondent name must be part of the household.
  4. If the gender of the head is selected male then the spouse should be female or vice versa head is female then the spouse should be male.

In this regard, I need your help as always your support to the users.
Thanks

Hi @Kal_Lam

Hope all doing well, I am stuck now in some of the roster validation. As follows

  1. The first member should be the household head ( I did this ) but here in the same field, the second validation spouse should not be selected if the head is not married or vice versa spouse only be selected when the head is married.
  2. My second question is, I have a field outside the roster that should equal the roster field. (Like the questions asked 1. male above the age of >=18 2. female above the age of =>18 3. girls below the age of <18. 4. boys blow the age of <18. So, all these will validate when the last person entered in the roster if all the above categories are not matched then shows the error message. this should be validated with age brackets
  3. 3rd question is related to the text field I have the respondent’s name which is asked prior to or outside of the roster so I just want that if the name is not matched within any position or iteration then give the error message that the respondent name must be part of the household.
  4. If the gender of the head is selected male then the spouse should be female or vice versa head is female then the spouse should be male.

In this regard, I need your help as always your support to the users.
Thanks

Hi,@Kal_Lam
I am new here.

Hope all doing well, I am stuck now in some of the roster validation. As follows

  1. The first member should be the household head ( I did this ) but here in the same field, the second validation spouse should not be selected if the head is not married or vice versa spouse only be selected when the head is married.
  2. My second question is, I have a field outside the roster that should equal the roster field. (Like the questions asked 1. male above the age of >=18 2. female above the age of =>18 3. girls below the age of <18. 4. boys blow the age of <18. So, all these will validate when the last person entered in the roster if all the above categories are not matched then shows the error message. this should be validated with age brackets
  3. 3rd question is related to the text field I have the respondent’s name which is asked prior to or outside of the roster so I just want that if the name is not matched within any position or iteration then give the error message that the respondent name must be part of the household.
  4. If the gender of the head is selected male then the spouse should be female or vice versa head is female then the spouse should be male.

In this regard, I need your help as always your support to the users.
Thanks

@Zaman, it would have been easy for the community if you had made separate posts for each issue. You could however follow the advise in the upcoming days though. Regarding your query, you could do this in multiple ways. The one I have listed below is not only the solution, there could be other ways to do this too. Maybe our community should also be able to make improvements in the solution and continue the discussion moving forward. But as of now, this is the solution for your issue.

In the survey tab of your XLSForm:

In the choices tab of your XLSForm:

image

Data entry screen as seen in Enketo: the fist member should be the HH head

Data entry screen as seen in Enketo: spouse can notbe selected if the HH head is single

Data entry screen as seen in Enketo: total number of boys recorded outside and inside the roster should match

Data entry screen as seen in Enketo: name of the HH head recorded outside and inside the roster should match

Data entry screen as seen in Enketo: the gender of the HH head and the spouse should match

Reference XLSForm:

Roster Multiple Constraint.xlsx (36.1 KB)

Hi @Kal_Lam ,
Sorry for the late replying.
Thank you very much for replying and it is a great help as I expected. However, I just want that there is any possibility to restrict the user (enumerator) in the current iteration (field), besides from the end of the roster.

Like if a user makes the mistake of selecting the head is unmarried but also selecting the spouse, when he selects the spouse error message should display “Head is unmarried” immediate after selecting the spouse in any position of the roster. This will work in constraint I think so.

Again thanks for helping and I hope that this will also resolve.