Hi All
Does anyone know if it possible to have a relevant question based on whether an image is captured from the camera or a file?
My workflow is this: A user might be travelling along (doing other tasks) spots a species and takes a photo with their device. Sometime later they will open the Opportunistic Species capture form enter some information about the species and add the photo. If this photo is added from file, I would like the user to have the option to override the Lats and Long using the exif from the image. I can grab the exif info no problem and use that to locate the geopoint, but I only want that as an option to be displayed if an image is added via the file option.
Cheers, Chris
Solved! Go to Solution.
Hi @ChrisRoberts2,
There is no direct way on a single image question to know if the image was capture with camera or selected from file.
However you could create two image questions, making each one relevant based on a select one question that asks do you want to take a new photo with camera or select from file. You can then use the method= parameters to control the camera to only allow that option. You can then apply the calcs based on which image question was used.
Regards,
Phil.
Hi @ChrisRoberts2,
There is no direct way on a single image question to know if the image was capture with camera or selected from file.
However you could create two image questions, making each one relevant based on a select one question that asks do you want to take a new photo with camera or select from file. You can then use the method= parameters to control the camera to only allow that option. You can then apply the calcs based on which image question was used.
Regards,
Phil.
Thanks Phil
Thats a good solution!
Cheers
Hi @Anonymous User
I think the answer to this is no, but...
Can yu copy an image from one image question to another? The reason I ask is that I have tweaked the above workflow a bit. I now have a null image question at the begining of the survey that allows the user to upload an image in order to grab the survey location via an exif pulldata calcualtion. The observations related to that survey are then part of a repeat. Is it possible to give the option to the user to copy/attach the image to the first observation in the repeat? I could just get them to attach the image again, but I thought I could stream line it a bit. Of course thinking about it, if this did work I imagine that it would not only attach the image to the first repeat, but to each subsequent one as well?!
I dont wont to attach my whole xlsform, but here is what I was attempting.
type | name | label | hint | guidance_hint | appearance | required | required_message | readonly | default | calculation | constraint | constraint_message | relevant |
select_one YesNo | copyimage | Use this image for first species record | horizontal | string-length(${image3})>0 | |||||||||
begin repeat | |||||||||||||
image | image4 | image | if(${copyimage}='Yes',${image3},'') | ||||||||||
end repeat |
Hi @ChrisRoberts2,
You are correct, the answer is no. There is no way to copy the image from one question to another, or from one repeat record to another. The image has to be selected from file browser or captured with camera. This is because the image would have to be renamed and the links in the database updated on the copy of the image, to avoid two questions or two repeats using the same image, they need to be unique file names.
Regards,
Phil.
Thanks Phil ... I figured as much! I have ended up just adding a note informing the user that they need to upload the image again in the Observation section.
Cheers, Chris