Page 1 of 3

Menu List Problem

Posted: September 25th, 2023, 1:34 am
by Romij Chowdhury
what is the solution of this problem? I already create a menu list but I cant access it.Can anyone tell me what should be the direction in "view" code or anyone can give me the tutorial of it......

Re: Menu List Problem

Posted: September 26th, 2023, 10:54 am
by justinlakier
First, test that your view(URL) statements work normally on their own, outside of the other potentially confounding logic. If these are broken then the issue may not be with the menu list. Next, there seems to be a problem where you are getting the result of manual_choice. You are looking for values of 1 and 2 corresponding to the 1st and 2nd items in the list, but the addition of "........" in between "Bt Brinjal Sample" and "Bt Brinjal Census" means that Census is not actually the 2nd item in the list, and you would need to click on "........" in order to view that link. The tutorial on Accept is here (https://www.csprousers.org/help/CSPro/a ... ction.html), and the tutorial on View is here (https://www.csprousers.org/help/CSPro/v ... ction.html). If this does not help, please provide additional details of your problem including a .zip file containing your application, either here or at CSPro@lists.census.gov.

Thank you,
Justin

Re: Menu List Problem

Posted: September 27th, 2023, 1:16 am
by Romij Chowdhury
Sir i did all this thinks but what should be the direction set in view code is it from pc or dropbox file location?

Re: Menu List Problem

Posted: September 27th, 2023, 4:28 am
by Romij Chowdhury
is this a correct logic for Menu list which we can access any Survey?

Re: Menu List Problem

Posted: September 27th, 2023, 12:02 pm
by justinlakier
If you want to open a survey rather than view the pen file, there is an example of a typical menu in the folder Examples\1 - Data Entry\Listing Menu with Map\Menu.
// Launch the listing application to add a new structure
function addStructure()
    Pff listing_pff;
    listing_pff.load("../Listing/Listing.pff");
    listing_pff.setProperty("StartMode", "Add");
    listing_pff.exec();
end;
This enables the menu to open other CSPro files. You can use Pff.exec() or execPff(), both of which have further details listed in the Helps. You can also check other Menus in the example folder. So, rather than attempting to view .pen files to open surveys, the menu should execute .pff files. If you have any other questions, please let us know.

Hope this helps,
Justin

Re: Menu List Problem

Posted: September 30th, 2023, 1:38 am
by Romij Chowdhury
No i can''t open the pff file from menu

Re: Menu List Problem

Posted: September 30th, 2023, 2:32 am
by Romij Chowdhury
how will i set the survey files in the my android device so that the view logic ken access pen file from the menu list

Re: Menu List Problem

Posted: October 1st, 2023, 12:35 am
by justinlakier
Your code is looking for "../csentry/Bt.Brinjal_Sample/BT.Brinjal_Sample.pff". According to the error message, going up a level to the parent directory for ".." is looking to "/storage/emulated/0/csentry/csentry/Bt.Brinjal_Sample/BT.Brinjal_Sample.pff". The relative file locations on Windows and Android may be somewhat different. If Android is storing the .pff file in another path, find where the file is being deployed to in your csentry folders and make sure the path in your code can get there.

Re: Menu List Problem

Posted: October 1st, 2023, 2:09 am
by Romij Chowdhury
And For the logic ''View''? what would be the solution?

Re: Menu List Problem

Posted: October 2nd, 2023, 10:57 am
by justinlakier
View accesses and displays the contents of a file given the file path, but .pen files are binary, so this is useless. If you want to open a survey, you would execute a .pff as you seem to be doing in your code snapshot. Could you clarify what you are trying to do by viewing the .pen files?