HOW TO LINK PLOTS AND CROPS

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
KAPALA
Posts: 13
Joined: July 18th, 2017, 1:09 am

HOW TO LINK PLOTS AND CROPS

Post by KAPALA »

Suppose I am creating a CSPro CAPI for Agriculture Survey. I have a modules where i have to list all plots name a farmer planted in particular season. Suppose that in PLOTS MODULE, A farmer own may be 3 plots. Plot 01 with name A, Plot 2 with name B and Plot 3 with name C. So we have plots names A, B and C in Plots Module. Coming to CROPS MODULE, we have to start by writing/selecting crops which were grown in each plot. We understand that more than one crops can be mixed in one plot, it means that the number of rows in CROPS MODULE will increase. For example crops in Plot name A are Tomatoes, Beans, Onions, Maize ALSO in Plot name B are Yams, Beans, Pumpkins AND in Plot Name C are Maize, Beans and Tomatoes. Now, how can i manage to include crops in a particular plots in CROPS MODULE?? How can i control repetition of same crop in a particular plot?? Can you create a simple CSPro CAPI with this scenario?? I will be very much happy if i will get solution for this problem.

Thank You for Your Support!!!
Albert Kapala
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: HOW TO LINK PLOTS AND CROPS

Post by htuser »

Dear Albert,
I've solved this issue conceptually for a more complexes scenario who include trees and crops in each parcel(plot).
1.- Create a first roster to collect data for each parcel(plot) and crops and trees.
Please, use a checkbox to collect multiples crops for each plot
2.- Give a unique code for each crops specifically for each plot.
for example:
Plot name A are Tomatoes, Beans, Onions, Maize;
Plot name B are Yams, Beans, Pumpkins;
Plot Name C are Maize, Beans, Tomatoes;

If data in Plot name A is collected in roster occurrence 1, we'll have as code:
A_1_Tomatoes, A_1_Beans, A_1_Onions, A_1_Maize;
and following the same coding for others plots and crops.

3.- After, you'll loop in this first roster and fill an array with crop names label and crop codes.
4.- Use show array to display each crops in following rosters where you need to collect data for each specific crops;
Note also that, you can use writecase or save array to save this array and use it and link it for following rosters.
Hope this help you,
G.VOLNY, a CSProuser from Haiti, since 2004
KAPALA
Posts: 13
Joined: July 18th, 2017, 1:09 am

Re: HOW TO LINK PLOTS AND CROPS

Post by KAPALA »

Thank You very much for your response.
I am non programmer so sometimes understanding complex issues in CSPro it i sometimes become challenging on my side. I am humbly requesting your assistance that, just create simple rosters with such scenarios so that i can see the codes. My mail is kapalalbert2013@gmail.com
Thank You so much

Regards
Albert Kapala
+255 768202040
Post Reply