Please CSPRO Community,
I need help in building a control that can check that the number of farms of any given holder is equal to the count of the IDs assigned to those farms. For instance if a farmer has 4 farms and the IDs assigned to each farm must equal the count of the sequentially numbers 1,2, 3, and 4. Or alternatively, is it possible to generate these farm ids directly from the number of farms for any given holder.
In the attached application, I want a consistency check between NFields and Field_ids for any holder. So, if a holder has 3 farms the field_ids must not exceed 3 or can't be less than 3 for the given hold. Attached is the application am trying to build.
Control to Check that number of Farms holder owns must equal the count of the Farm ID for the Holder
Control to Check that number of Farms holder owns must equal the count of the Farm ID for the Holder
- Attachments
-
- Household_Quest.zip
- (538.29 KiB) Downloaded 231 times
Re: Control to Check that number of Farms holder owns must equal the count of the Farm ID for the Holder
Set the first FIELD_IDS to 1 and assign the next FIELD_IDS to the previous occurrence of FIELD_IDS + 1. If the holder changes then reset FIELD_IDS to 1.
If NFIELDS = 3, would the values in the occurrences be:
NFIELDS = 3, FIELD_IDS = 1
NFIELDS = 3, FIELD_IDS = 2
NFIELDS = 3, FIELD_IDS = 3
If that's the case your consistency check should allow NFIELDS to be greater than FIELD_IDS, right? The way I understand your survey I would consider a consistency check that doesn't allow the holder to change unless the previous occurrences NFIELDS equals FIELD_IDS. Otherwise, they can change NFIELDS or add another field.
If NFIELDS = 3, would the values in the occurrences be:
NFIELDS = 3, FIELD_IDS = 1
NFIELDS = 3, FIELD_IDS = 2
NFIELDS = 3, FIELD_IDS = 3
If that's the case your consistency check should allow NFIELDS to be greater than FIELD_IDS, right? The way I understand your survey I would consider a consistency check that doesn't allow the holder to change unless the previous occurrences NFIELDS equals FIELD_IDS. Otherwise, they can change NFIELDS or add another field.
Re: Control to Check that number of Farms holder owns must equal the count of the Farm ID for the Holder
Aaronw,
Again many thanks for the useful guide you provided. With the guide, I was able to build the consistency check. Thanks
Again many thanks for the useful guide you provided. With the guide, I was able to build the consistency check. Thanks