Stranging behaviour of multi language CAPI application: Showing previous case value set and CAPI Text

Discussions about creating CAPI applications to run on Android devices
Post Reply
msoni
Posts: 11
Joined: February 19th, 2024, 11:38 am

Stranging behaviour of multi language CAPI application: Showing previous case value set and CAPI Text

Post by msoni »

Hello
Greetings
I have a multi language CAPI application in which i have 3 languages to be used.
For each question, i have three language value sets and three language CAPI text. In the same application, i am using hierachical filters ( Showing applicable value sets, using setvalueset function within the language). All logics working fine.

Application works fine some time and sometimes shows previous cases's CAPI text during start of the new case and sometimes showing incorrect value sets based on previous cases. I am using onfocus and not the preproc. Despite this , this happens sometime in application.
When i come out from the case list screen and open the app again in Android, all things start work fine again.

I want to put some logic or some way of refreshing all value sets and CAPI text, during end of a case or before starting a new case, so each case starts and shows fresh value sets and CAPI text.

Our data collection will happen in Android device.


Please suggest.
Thanks and Regards
Manoj
justinlakier
Posts: 156
Joined: November 21st, 2022, 4:41 pm

Re: Stranging behaviour of multi language CAPI application: Showing previous case value set and CAPI Text

Post by justinlakier »

Hello,

CAPI Text and value sets should both automatically reset between cases without need for any sort of "refresh". This is not an error we are familiar with. Please attach your zipped application and any necessary lookup data files so that we can test this. If the application or any necessary data files for testing are too sensitive to post publicly, then please send them and any instructions to reproduce the error to cspro@lists.census.gov so that we can find why this error is occurring and how to fix it.

Thank you,
Justin
msoni
Posts: 11
Joined: February 19th, 2024, 11:38 am

Re: Stranging behaviour of multi language CAPI application: Showing previous case value set and CAPI Text

Post by msoni »

Thanks.
Yes, it should refresh between cases. Sometimes it does not refresh the value sets and shows the previous case value sets.
Attaching the application.
Issues are with id items where setvalueset function is being used. There is no lookup files being used.

Thanks and Regards
Manoj
Attachments
HHList.zip
(327.35 KiB) Downloaded 10 times
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Stranging behaviour of multi language CAPI application: Showing previous case value set and CAPI Text

Post by Gregory Martin »

I'm not sure if this is fully the issue, but when I was testing your code, there were some issues after changing from English to Hindi and then trying to change back to English. The reason is that you are using two codes for English. In the dictionary, English is defined with the name "EN." In the question text, it is defined as "ENG." When I standardized this, the issues that I was seeing went away.
msoni
Posts: 11
Joined: February 19th, 2024, 11:38 am

Re: Stranging behaviour of multi language CAPI application: Showing previous case value set and CAPI Text

Post by msoni »

Thanks for your reply.

I was using in Value set as EN for every variable/Item in CSPro dictionary. However in CAPI language area, it was ENG. I changed that to EN. Meaning I changed all places to EN now.

Did you find any other issues in the code. However i will check, if the said issue resolved.

Thanks and Regards
Manoj
Post Reply