Error modifying case on tablet

Discussions about creating CAPI applications to run on Android devices
Post Reply
Melly
Posts: 3
Joined: November 17th, 2017, 7:33 am

Error modifying case on tablet

Post by Melly »

I developed a template. It works perfectly on my laptop but it's giving an error message that "The case specified for modifying was not located in the data file" on android.
Please, what might cause the problem
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error modifying case on tablet

Post by josh »

How are you modifying the case? Are you just tapping on the case in the case list screen or are you using a menu program to launch the data entry program? If it is the latter then most likely the case id that the menu program is writing out is not correct.
Melly
Posts: 3
Joined: November 17th, 2017, 7:33 am

Re: Error modifying case on tablet

Post by Melly »

Thanks for the response.
I am lunching from a menu. It sees the case if it's not partial saved as being a duplicate.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error modifying case on tablet

Post by josh »

If you are using CSPro 7.2 or earlier make sure to add the ID items in the startMode parameter of the pff file that you write out. For example:

Code: Select all

filewrite(pffFile, "StartMode=Add;%v%v%v%v%v", HH_PROVINCE, HH_DISTRICT, HH_EA, HH_SEGMENT, HH_NUMBER);
If you are using CSPro 7.3 or later you can use the key parameter in the pff rather than setting the startMode. Using key sets both the start case key and also automatically fills in the id items on the form for you.

Code: Select all

	// Set the Key to indicate what household to modify/add
	household_pff.setproperty("Key",
		maketext("%v%v%v%v%v", HH_PROVINCE, HH_DISTRICT, HH_EA, HH_SEGMENT, HH_NUMBER));
Both of these examples are taken from the CAPI Census example in the CSPro examples directory. See the function LaunchHouseholdProgram().
Post Reply