Relevant based on if image is added from camera or file

331
5
Jump to solution
11-15-2021 09:52 PM
ChrisRoberts2
Occasional Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
Philip-Wilson
Esri Notable Contributor

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.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/esricustomcolumns.htm#ESRI_SECTION1_FC2E5...

Regards,

Phil.

View solution in original post

5 Replies
Philip-Wilson
Esri Notable Contributor

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.

https://doc.arcgis.com/en/survey123/desktop/create-surveys/esricustomcolumns.htm#ESRI_SECTION1_FC2E5...

Regards,

Phil.

ChrisRoberts2
Occasional Contributor III

Thanks Phil

Thats a good solution!

Cheers

ChrisRoberts2
Occasional Contributor III

Hi @Philip-Wilson 

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.

typenamelabelhintguidance_hintappearancerequiredrequired_messagereadonlydefaultcalculationconstraintconstraint_messagerelevant
select_one YesNocopyimageUse this image for first species record  horizontal       string-length(${image3})>0
begin repeat             
imageimage4image       if(${copyimage}='Yes',${image3},'')   
end repeat             

 

0 Kudos
Philip-Wilson
Esri Notable Contributor

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.

ChrisRoberts2
Occasional Contributor III

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