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

Discussions about CSEntry
Post Reply
lmoriba
Posts: 21
Joined: June 10th, 2018, 6:21 pm

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

Post by lmoriba » February 14th, 2020, 6:36 am

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 6 times
Farm_survey.xlsx
(9.99 KiB) Downloaded 7 times

etuser
Posts: 6
Joined: September 3rd, 2019, 5:57 am

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

Post by etuser » February 14th, 2020, 7:32 am

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 6 times

lmoriba
Posts: 21
Joined: June 10th, 2018, 6:21 pm

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

Post by lmoriba » February 14th, 2020, 1:26 pm

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: 245
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 » February 18th, 2020, 8:18 am

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 6 times

Post Reply