Multiline image question custom file name only being applied to first photo

859
6
Jump to solution
10-07-2022 05:59 AM
Mark_Johnson
New Contributor III

I created a multiline annotate question with a custom file name expression in bind::esri::parameters:

fileName=concat(${facilityid},"_", format-date(${inspdate}, "%Y%m%d%H%M%S"),"_",position(..))

using the unique asset ID, an inspection date question, and to make sure it's a unique name, the number of the image in the multiline question.

When I test the form, the first photo I take gets named correctly, like:

999_202210060912_0.jpg

but then any additional photos revert to the default naming, like:

swBasInsp_image_20221006-091341.jpg

I found another post that says "position" only works with repeats, not multiline, but then shouldn't it throw an error instead of working for the first photo?

 

Survey Connect 3.15.178, tested on iPad and Android phone apps.

Survey in Enterprise 10.9.1 using a feature service referencing a SQL Server geodatabase

 

Thanks for any suggestions

 

1 Solution

Accepted Solutions
Mark_Johnson
New Contributor III

Esri Support confirmed that "position" should not be used with multiline.

Their solution:

Create a note (I used calculate) question "img_cal" before your image question with calculation column: 

 

count-selected(${IMAGE QUESTION})+1​

 

Reference "img_cal" in your image question's bind::esri:parameters file formatting:

 

fileName=concat(${facilityid},"_", format-date(${inspdate}, "%Y%m%d"),"_",${img_cal})​

 

It's working for me.

I also tried eliminating the separate question with

 

fileName=concat(${facilityid},"_", format-date(${inspdate}, "%Y%m%d"),"_", count-selected(.)+1)

 

which does NOT work.

View solution in original post

6 Replies
JonahW
by
New Contributor III

Were you able to get a resolution to this? I am running into the same problem, only the first image gets  named as per the calculation. All the subsequent images revert back to the default. 

0 Kudos
JoseBarrios1
Occasional Contributor III

Any news for when does this function will be available for multiline image? I'm having the same issue. The "filename=" expression in bind::esri::parameters only pass the first instance of the name and then return to the default value after the first image. (Connect 3.16 106)

Thanks,

JB

0 Kudos
Mark_Johnson
New Contributor III

I just submitted a case to Support, I'll post the result here.

JasonJordan00
Occasional Contributor

Also interested in this as all of our photo submissions have more than one file. Even just tacking a 1, 2, or 3 at the end of each subsequent file would work.

0 Kudos
Mark_Johnson
New Contributor III

Esri Support confirmed that "position" should not be used with multiline.

Their solution:

Create a note (I used calculate) question "img_cal" before your image question with calculation column: 

 

count-selected(${IMAGE QUESTION})+1​

 

Reference "img_cal" in your image question's bind::esri:parameters file formatting:

 

fileName=concat(${facilityid},"_", format-date(${inspdate}, "%Y%m%d"),"_",${img_cal})​

 

It's working for me.

I also tried eliminating the separate question with

 

fileName=concat(${facilityid},"_", format-date(${inspdate}, "%Y%m%d"),"_", count-selected(.)+1)

 

which does NOT work.

MattEdrich
Occasional Contributor

WOW I am so glad I found this thread! I am shocked that this issue is not mentioned in any of the documentation I have been able to find about using images in S123.

NOT knowing about this could be extremely problematic for organizations using S123 to serve multiple clients with the same survey, should any one of those clients ever request the complete set of raw photos for a site/project/region/etc.