Problem renaming attached photos

526
2
11-18-2021 07:16 AM
AndrewBowne
Frequent Contributor

I have a survey where a user can attach one or more photos to a survey using a repeater.  One of the requirements is to rename the photo to a name reflective of comments in the survey - i.e. (photo1), (photo2), etc.  What I am finding is that you cannot rename an attachment using a name that duplicates any other attachment for that feature class.  So, if  John Doe submits a survey response ("A") with photo attachments renamed to "Photo1" and "Photo2", Survey response "B" from John Doe or any other user cannot have attachments also called "Photo1" and/or "Photo2".  What happens is the Rename Dialog simply will not let you submit the name.  

Anybody else experience this?  Or, know of a workaround?

0 Kudos
2 Replies
LeonardBarnhill
Frequent Contributor

Experienced? Yes.  My workaround was to behind-the-scene concat ${todays_date} to the provided rename of the photo.

0 Kudos
AndrewBowne
Frequent Contributor

I wonder why you can't have attachments with the same name?  Especially if they are attachments for different features.  Actually - why couldn't you have attachments for the same feature with the same name?  I don't believe it to be an index field.

0 Kudos