Auto generate farm Id number from Number of Farms in a given roster

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
lmoriba
Posts: 56
Joined: June 10th, 2018, 6:21 pm

Auto generate farm Id number from Number of Farms in a given roster

Post by lmoriba »

Dear CSPRO community,

I need an urgent help. Am doing doing a survey on farmers: basically collecting information on the farmers, the number of farm plots and the location of each farm plot. I want to use number of plots to auto generate the plot ids of each farmer before i can move to the next farmer. If that is not possible then I want a consistency check for each farmer, based on his total number of farms to ensure that a count of the farm ids equals the total number of farms for that farmer.

I have attached my questionnaire, filled one in excel to illustrate my example.
Attachments
farm_survey.zip
(3 KiB) Downloaded 163 times
Farm_survey.xlsx
(9.99 KiB) Downloaded 173 times
etuser
Posts: 85
Joined: September 3rd, 2019, 5:57 am

Re: Auto generate farm Id number from Number of Farms in a given roster

Post by etuser »

Dear Sir,

Here i tried to re-arrange your entry form, Please see the attached file .

Cheers
Attachments
farm_survey.dcf.zip
(3.18 KiB) Downloaded 179 times
lmoriba
Posts: 56
Joined: June 10th, 2018, 6:21 pm

Re: Auto generate farm Id number from Number of Farms in a given roster

Post by lmoriba »

Many thanks Etuser. Thanks for your prompt response. Is good to know of a solution when you rearrange the questions. That's okay 😊.

However, I am seeking for a solution when you don't arrange the questions. I want a solution: if it will be possible to generate the farmId from the number of farms or a check to ensure that the count of the farmIds doesn't exceed the number of farms for each farmer on the roster.
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Auto generate farm Id number from Number of Farms in a given roster

Post by aaronw »

I've attached an example solution. I've made each farmer's information its own case. CSPro was not designed to have one case for the entire survey.

Next, I organize the questionnaire into two records. One singly occurring record where the farmer's name and total plots is collected. Then a second multiply occurring record where I prefill the plot id and location description. When the number of occurrences in the FARM_DETAILS_REC is greater than the total plots the roster ends (and so does the case).

Walk through the survey and let me know if you have any questions.
Attachments
farm.zip
(2.88 KiB) Downloaded 185 times
Post Reply