Lost prefilled data while entry in CAPI android

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
liennhu
Posts: 5
Joined: March 10th, 2019, 11:35 pm

Lost prefilled data while entry in CAPI android

Post by liennhu »

Dear CsPro users,

I have prefill logics to fill Plot ID and other information from the previous roster to the following. The prefill working well but I am really struggling during the data entry while the Plot ID prefilled with logics keeps disappearing whenever I reach the next var in roster (the "Power" variable in "Land preparation" roster").

Please kindly find the attached file for the example. Thank you very much for your kind support so far and forward!

Best regards,
Lien
Attachments
Lost pre-fill data.zip
(21.4 KiB) Downloaded 206 times
liennhu
Posts: 5
Joined: March 10th, 2019, 11:35 pm

Re: Lost prefilled data while entry in CAPI android - Plot ID turned into 0 or missing :(

Post by liennhu »

Hello CSPro users, I am sorry that the previous file couldnt run for extra logics. I added the new example for your reference. I am looking forward to your response and disscusion.
Attachments
Lost pre-fill data.zip
(75.91 KiB) Downloaded 198 times
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Lost prefilled data while entry in CAPI android

Post by Gregory Martin »

Your application couldn't be loaded because you didn't include this dictionary:

..\Data\Wave 1 to lookup\Copy of Lookup dict.dcf

Can you include this and then give us instructions on how to recreate your problem?
liennhu
Posts: 5
Joined: March 10th, 2019, 11:35 pm

Re: Lost prefilled data while entry in CAPI android

Post by liennhu »

Gregory Martin wrote:Your application couldn't be loaded because you didn't include this dictionary:

..\Data\Wave 1 to lookup\Copy of Lookup dict.dcf

Can you include this and then give us instructions on how to recreate your problem?
Hi Martin,

I added "Lookup dict.dcf" and "Part D and E.csdb" for loading the look-up data into the application.

For the problem that i am facing now, I added three pictures, alll packed in .zip file,2 of which were seperately added as attachments here.

Another relevant detail: I created the logics to auto fill the W2_E1 - Plot code, in Roster PART2_E1000 - HT land preparation. It basically to fill the plot code when the plot is grown with either "Rice" or "Rice with Aquaculture" in W2_D8A_19 - HT 2018 season crop, Roster PART2_D1B000 - Rice plot Part 2.

Problem happens when we enter from 2 plots, let's enter number of plots so that "W2_D0_2 + W2_D0" >= 2. Then the second plot code in W2_E1, even though filled previously when we are at W2_E1, will disppear when I moved to Land preparation Power, eg. And the plot code field W2_E1 will not show up in Data viewer also.

Please let me know if anything unclear.

Thank you very much for your kind support

Best
Lien
Attachments
Lost prefill data 2.zip
(941.65 KiB) Downloaded 190 times
2.Plot code disappear when moving to 4th variable onward.png
2.Plot code disappear when moving to 4th variable onward.png (76.23 KiB) Viewed 2815 times
1.Auto-fill plot code.png
1.Auto-fill plot code.png (81.96 KiB) Viewed 2815 times
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Lost prefilled data while entry in CAPI android

Post by Gregory Martin »

Can you figure out exactly when the plot code is being changed to blank? You have this code over and over in the PART2_E1000 roster:
W2_E1(curocc(PART2_E1000))=E1(curocc(PART2_E1000));
Is there a reason that you need to keep filling this code in, rather than just filling it once in PROC W2_E1?

Also, you can make your code much more readable by getting rid of a lot of the curocc(PART2_E1000) references. When you're on that roster, you can just call curocc without an argument. For example:
if curocc(PART2_E1000) <= (i)
   
and W2_D8A_19(curocc(PART2_E1000)) <> 1 and W2_D8A_19(curocc(PART2_E1000)) <> 2
   
then  $(curocc(PART2_E1000)) =0;
    {noinput;}
   
skip to next;
endif;
You can change that to:
if curocc() <= (i)
   
and W2_D8A_19(curocc()) <> 1 and W2_D8A_19(curocc()) <> 2
   
then  $ = 0;
    {noinput;}
   
skip to next;
endif;
Post Reply