Error calling from External File

Discussions about CSEntry
Post Reply
Bhupender11
Posts: 63
Joined: May 15th, 2018, 1:18 am

Error calling from External File

Post by Bhupender11 »

Dear CSPro Team,

I have an error while calling from external file.

I have Menu. From Menu, I call a case from external file then after collecting data from that case, If I call it again through Menu then it shows an error attached here.

Please help me to find the solution of this issue.
Attachments
error.docx
(140.3 KiB) Downloaded 147 times
munirmdee1
Posts: 74
Joined: August 17th, 2015, 9:32 am
Location: Dar es Salaam, Tanzania

Re: Error calling from External File

Post by munirmdee1 »

Hi Bhupender11,

The error message you are getting its not comming from the external file you are referring, that comes from the case ID you entering, you are repeating entering the same ID which you already entered and save the case.

So I suggest you try entering a new case id in your form, you wont see that error.

Hope that will solve your problem.
Munir Mdee
Software Programmer
National Bureau of Statistic (NBS)
Jakaya Kikwete Road,
P.O.Box 2683,
Dodoma,TANZANIA
Mob: +255 755 740090
Email: munir.mdee@nbs.go.tz
munirmdee@gmail.com
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error calling from External File

Post by josh »

That error is probably because you are launching the second application with the same id-item values specified in the pff file and setting the startMode to add to instruct it to create a new case. When you do that, it tries to create a new case with the same id-items instead of reopening the existing case. Try setting the key parameter in the pff file you write out instead of setting the startMode. If you set the key, CSPro will automatically set the start mode to modify if the case already exists and will create a new case if it does not.
Bhupender11
Posts: 63
Joined: May 15th, 2018, 1:18 am

Re: Error calling from External File

Post by Bhupender11 »

Can you have an example of how to write key
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error calling from External File

Post by josh »

The help for pff object has an example: https://www.csprousers.org/help/CSPro/pff.html
In the CSPro examples directory the CAPI census, Labor Force Survey and Listing Menu with Map examples all use the key attribute.
The workshop materials also have an example https://www.csprousers.org/resources/CS ... rkshop.pdf. See page 66.
Bhupender11
Posts: 63
Joined: May 15th, 2018, 1:18 am

Re: Error calling from External File

Post by Bhupender11 »

Dear Josh,

I have tried key function but same error comes.

I have attached dummy application for the same.

If I call same case which is completed or partially completed first then this error comes.


please check what is the issue.
Attachments
Dummy.7z
(23.49 KiB) Downloaded 160 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error calling from External File

Post by josh »

The zero fill settings for the items in SAMPLE_DICT does not match the zero fill for the id-items in HH dictionary. Try setting zero-fill to "yes" for everything.
Bhupender11
Posts: 63
Joined: May 15th, 2018, 1:18 am

Re: Error calling from External File

Post by Bhupender11 »

Thanks
Post Reply