My survey allows for multiple photos. Once I download and extract the photos, is there an automated way to join the photo names from the attachment table to the one record for that survey? Ideally, I would like each record in my survey to have a field for [PHOTO1], [PHOTO2], [PHOTO3], etc.
Jodie,
There is a way of doing this, but without seeing certain items within your data schema I cannot give you the direct answer. However, I can lend a hand in helping you possibly achieve what you are looking to do.
Typically within the Survey123 application you will have the Parent feature (point) that has the related table as a child feature. Within each of the tables there will be a GUID field that contains one of two things and named in a certain manner.
Parent Feature table will contain a database field named "GlobalID" and this contains a unique ID. When you add in the ability to store photos, there will be a related table created that is named the same as your feature with the suffix "__ATTACH" within it's name. This table contains the photos that the person filling out the form submits.
Within the attachments table you will notice a data field called "ATT_NAME" and this contains a name of each photo that is submitted with the survey. The name of the photo typically reflects the Name of the "image" question, followed by number of the of the photo being submitted and then a unique ID with the suffix ".jpg"
Here is an example from one of my attachment table values for ATT_NAME entry "BC_Photo1-3d10e77696b844e0aef886930f1ed250.JPG". What I did was the following steps -
I do know that these have been previous scripts created that would export the attachments for a hosted feature service and one of them that will allow for the creation of a folder based on unique feature field and then only the photos for it will be exported into that folder. You could potentially end up with a lot of folder to go through.
I hope this helps you get to how you would like to have the your photos named.
Mike
Thank you, Mike. I wasn't clear on my question. I have multiple photos for each record (point) in my survey. My ATTACH table has each of these photos listed as a separate entry and I would like to somehow join each of these photo names to the one point in my survey feature class. In a sense, I need to flatten the one-to-many relationship. I've played around with various tools, but can't seem to automate this. Do you know of a way to easily do this? Thanks, again!
Hello Jodie,
So, you are attempting to the push the "names" of the photos found within the "ATT_NAME" data field of the attachment table into a data field within the parent feature class?
Is that what you are trying to do?
Yes, I would like to add many fields to the record in the parent feature class. I would like each field to hold one photo name that is associated with that feature in the ATT_NAME field. So I'd like to add the fields [PHOTO1], [PHOTO2], [PHOTO3], and so on. Some of my records have up to 21 photos and I'd like to have each photo name captured in the parent feature class. I need this to send to another department in Excel so that they can reference the photos as they are stored on our server.
Hi Jodie, Did you ever resolve this issue? I am in the same situation where I have more than one photo related to a record and I cannot seem to get a one-to-many join to work in ArcGIS Pro