Dear team,
I developed a "takephoto" function and its working well. I want to take some photos in a household. But, when I take a new photo, it replaced the previous one (its taking only one photo). How can I take more photos within a case. I have used following photo' name which is my data ID:
photoFileName = pathname(CSEntry) + maketext("App2020/SYS/Images/D%0d-P%02d-W%02d-E%02d-H%03d.jpg",
DISTRICT1,CUR_MINU,CURRENT_WARD,INTERVIEWER,HOUSEHOLD);
Thank you.
Arjun
Add a new photo
Re: Add a new photo
Since the name of the file is based only the case ids you can only have one photo per case. Add a second photo question and include the question number in the file name. So if you have an item named PHOTO1 and another named PHOTO2 then do something like:
photoFileName = pathname(CSEntry) + maketext("App2020/SYS/Images/D%0d-P%02d-W%02d-E%02d-H%03d-PHOTO1.jpg",
DISTRICT1,CUR_MINU,CURRENT_WARD,INTERVIEWER,HOUSEHOLD);
and similarly for PHOTO2.
photoFileName = pathname(CSEntry) + maketext("App2020/SYS/Images/D%0d-P%02d-W%02d-E%02d-H%03d-PHOTO1.jpg",
DISTRICT1,CUR_MINU,CURRENT_WARD,INTERVIEWER,HOUSEHOLD);
and similarly for PHOTO2.