Select to view content in your preferred language

Creating custom photo (multiline) file names with incrementing?

225
3
Jump to solution
12-02-2024 05:09 PM
VickiG
by
Regular Contributor

Hi:

I added a photo question (multiline) to a survey and we have just had the default file name up until now, but as more photos accumulate, it would be good to get a better naming structure in place.

I finally got a custom file name to work, not sure it is the right way, but is working.  However if you take a second photo, the file name reverts to the default (I allow up to 5 in the question).

I found this solution in the forum:

https://community.esri.com/t5/arcgis-survey123-questions/multiline-image-question-custom-file-name-o...

But I have so far been unable to get this to work.

I would think including the time with seconds would make the file names different, but after the first photo, subsequent photo file names revert to the default.

I have attached my survey in the current state.  Please feel free to laugh and point out any other egregious errors you see (I feel like I get ahead on S123C, then quickly back to "Whut!?" 😉

Any thoughts on the photo file issue are appreciated.

Thanks

Vicki

0 Kudos
2 Solutions

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

As for adding a count of photos at the end, I haven't seen this done before. Imagine it'll cause issues if people remove an earlier photo. Give it a go but if you see the default name it's because something is going awry.

Another alternative would be to have 5 image questions, with the question name set, and then make the subsequent image questions relevant to the previous image question being filled out. Again messy if people remove earlier photos so I can't recommend it.

Personally ould do name_yyyymmddss and just leave it at that.

View solution in original post

VickiG
by
Regular Contributor

Hi Christopher:

Thanks so much, your correction worked!  I also noticed I had 'format_date' instead of 'format-date', so corrected that as well.

The incrementing photo number from the calculation 'img_cal' also seemed to work with more than one photo in the multiline question. I now get file names like:

111111_2412031412_5.jpg

I tested several pix and they incremented file name correctly.  As you correctly pointed out, if you took 3 photos, deleted the 3rd, then took another '3rd' pix, the default name is applied, but when you take the 4th, the incremented file name is applied correctly.

Even with the occasional glitch as described above, the multiline question with the custom file names should work well for us.  I'll just make a note for data proofing that this may occur.  Currently I am doing the proofing, so I can rename manually.  We're not generating 100s of photos per survey, just a handful.

Thanks again for the help!

Vicki

 

View solution in original post

3 Replies
ChristopherCounsell
MVP Regular Contributor

fileName=concat(${Uamid_ID},"_",format_date(now(),"%y%m%d%h%m%s","_",${img_cal}))

Your bracket in format date should close after the date string format, not at the end.

fileName=concat(${Uamid_ID},"_",format_date(now(),"%y%m%d%h%m%s"),"_",${img_cal})

0 Kudos
ChristopherCounsell
MVP Regular Contributor

As for adding a count of photos at the end, I haven't seen this done before. Imagine it'll cause issues if people remove an earlier photo. Give it a go but if you see the default name it's because something is going awry.

Another alternative would be to have 5 image questions, with the question name set, and then make the subsequent image questions relevant to the previous image question being filled out. Again messy if people remove earlier photos so I can't recommend it.

Personally ould do name_yyyymmddss and just leave it at that.

VickiG
by
Regular Contributor

Hi Christopher:

Thanks so much, your correction worked!  I also noticed I had 'format_date' instead of 'format-date', so corrected that as well.

The incrementing photo number from the calculation 'img_cal' also seemed to work with more than one photo in the multiline question. I now get file names like:

111111_2412031412_5.jpg

I tested several pix and they incremented file name correctly.  As you correctly pointed out, if you took 3 photos, deleted the 3rd, then took another '3rd' pix, the default name is applied, but when you take the 4th, the incremented file name is applied correctly.

Even with the occasional glitch as described above, the multiline question with the custom file names should work well for us.  I'll just make a note for data proofing that this may occur.  Currently I am doing the proofing, so I can rename manually.  We're not generating 100s of photos per survey, just a handful.

Thanks again for the help!

Vicki