Page 1 of 1

Android menu issue

Posted: August 10th, 2017, 12:46 pm
by prabhustat
Hi,

Using the android menu I am not able to execute the SHG application, the error message i am getting

A 1010 Application error: protected field ID out of range - value is NOTAPPL

& fatal error in entry engine

W

function op_SHG();

string pffFilename = pathname(Application) + "../SHG/SHG.pff";
if setfile(pffFile,pffFilename,create) = 0 then
errmsg("Failed to open file %s", pffFilename);
endif;
filewrite(pffFile,"[Run Information]");
filewrite(pffFile,"Version=CSPro 7.0");
filewrite(pffFile,"AppType=Entry");

filewrite(pffFile,"[DataEntryInit]");
filewrite(pffFile,"StartMode=Add");
filewrite(pffFile,"Fullscreen=Yes");
filewrite(pffFile,"LOCK=VERFY,STATS");
filewrite(pffFile,"Interactive=Ask");
filewrite(pffFile,"");
filewrite(pffFile,"[Files]");
filewrite(pffFile,"Application=" + pathname(Application) + "../SHG/SHG.ent");
tempTextSHG=concat("Application=" + pathname(Application) + "../DATA/SHG/","SHG",edit("99999",EGP), edit("999",intvcode), ".DAT");
filewrite(pffFile,"InputData=%-128s",strip(tempTextSHG));
filewrite(pffFile,"");
filewrite(pffFile,"[Parameters]");
FileWrite(pffFile, concat("Parameter=",strip(cmid)));
close(pffFile);

execpff(pffFilename, stop);
end;

will you please give me idea to resolve

Thanks in advance,

P

Re: Android menu issue

Posted: August 10th, 2017, 1:17 pm
by josh
The field ID is set as protected on your form and you are not filling in a value for it so it is blank (notappl). CSEntry expects you to fill in all protected with valid values through logic since they can't be entered by the interviewer. Either make the field unprotected or add logic to fill in a valid value for it.

Re: Android menu issue

Posted: August 10th, 2017, 1:52 pm
by prabhustat
Thanks Josh for the quick response, I am using the same menu for windows and android. I have revised some changes for Android menu the problem i am facing not able to set the file name for the SHG application, i have enclosed application for your reference menu syntax in (Entry folder) will you please give idea on issue.

Thanks in advance.

P

Re: Android menu issue

Posted: August 10th, 2017, 2:14 pm
by josh
Change the line:

tempTextSHG=concat("Application=" + pathname(Application) + "../DATA/SHG/","SHG",edit("99999",EGP), edit("999",intvcode), ".DAT");

to

tempTextSHG=concat(pathname(Application) + "../DATA/SHG/","SHG",edit("99999",EGP), edit("999",intvcode), ".DAT");

You don't wan't "Application=" in the name of the data file.

Also please stop using alpha variables in logic and set attributes assisted. Use strings and set the capture type on the form instead.

Re: Android menu issue

Posted: August 10th, 2017, 2:50 pm
by prabhustat
Thanks Josh, I will try it. Yes want the application name in the data file.

Thanks,

P

Re: Android menu issue

Posted: August 14th, 2017, 3:39 pm
by shafique arif
Dear Josh

I have been struggling with use of Menu in csentry 7. I am using same or similar menu commands as were used for previous version 6 or 6.3 and it was working fine. But I am having issue with its use now. It works fine with Window and my smart phone (SAMSUNG GALAXY S4) but I is creating problems in my Tablet SAMSAUNG S2. Let me try to explain the issue: I use menu to run two questionnares: One School questionnaire and other Teacher questionnaire. When I run School questionnaire it work fine in tablet however when I select teacher questionnaire from menu, it crashes. And when I open csentry again, it shows 'Teacher' along with 'menu'. 'Teacher' is name of dic used for teacher questionnaire. Can you please help me in this regard.

Re: Android menu issue

Posted: August 14th, 2017, 5:08 pm
by josh
Next time please start a new topic as your question is different from the one originally asked.

My guess is that the file layout on the tablet where it is not working is different from what it is on the other devices you have tested.

Re: Android menu issue

Posted: August 15th, 2017, 5:07 am
by shafique arif
Dear Josh

Thanks for swift reply. I synced all files from the same folder from ftp server on both devices. Files should be the same. However, when I download csentry from play store on phone it shows ver7.1.0 (beta) dated Aug 7, 2017 where as on tablet it shows ver 7.0.2 Jun 29, 2017. Should I sent you my menu application?

regards

Re: Android menu issue

Posted: August 15th, 2017, 7:21 am
by josh
Sure. Send it to cspro@lists.census.gov. Please include detailed steps to reproduce the problem.