Editing Existing Photo Attachments (3.13) — How to add previously entered data in Watermark

880
6
Jump to solution
11-08-2021 08:17 PM
NickShannon2
New Contributor III

As for version 3.13, you can now attached photos to exisitng data.  Excellent.  Thank you Esri. 

I would like to add a watermark to the photos that has data previously entered (i.e. existing attribution info).

Here's my statement:

bottomLeftWatermark="Lat @[latitude]\nLong @[longitude]\nDateTime @[datetime:short]&size=30" bottomRightWatermark=${Defect_No_}

The Defect_No_ is the existing data. 

The statement above actually works, but I can't change the size of the Defect_No_. 

According to Esri's Tricks of the Trade :

Data from your form cannot be added directly in the bind::esri:parameters column. Do not attempt to include standard XLSForm functions within your watermark expression. The right way to do this is to first put together the watermark content in a separate question, and then reference that.

Because I'm working with exisiting data, I added a new field (DefectNo1) to my data to accommodate the calculateion step. 

For DefectNo1:    concat('Defect No:',${Defect_No_},'size=30')

bottomRightWatermark=${DefectNo1}

But this doesn't work. 

 

Any help appreciated.  

 

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Philip-Wilson
Esri Notable Contributor

Hi @NickShannon2,

Thanks for the additional information and screenshot, now I understand the problem. This is not related to editing surveys or the Inbox, this is a watermark configuration problem on any image questions.

What you are seeing is expected when you try to reference the value from another field as a component of a greater watermark statement. Due to the way the statement is compiled and processed behind the scenes, you can not combine the variable and size parameters together in the watermark statement. It must be done in another field to give a single text string, and then it can be referenced.

Please refer to the tip in the documentation here:

https://doc.arcgis.com/en/survey123/desktop/create-surveys/watermarks.htm#ESRI_SECTION1_4E32925B1D4B...

Therefore you need to do something similar to the following, and by using a hidden question and null field type, the extra question will not be visible to the user, nor stored in the feature layer, purely it is used for the calculation while the app is open:

PhilipWilson_0-1636604548097.png

I have also attached the example XLSForm i made. Hope this helps, from my testing it works great when adjusting the size.

Regards,

Phil.

 

View solution in original post

0 Kudos
6 Replies
Philip-Wilson
Esri Notable Contributor

Hi @NickShannon2,

Watermarks are currently only supported on new images, when taking a new photo using the Survey123 field app in-built camera. Watermarks can not be applied to existing images from the gallery or camera roll (browse to file) or when editing existing images via the Inbox.

Refer to documentation here: https://doc.arcgis.com/en/survey123/desktop/create-surveys/watermarks.htm

We will also update the blog post to include this known limitation: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-photo-watermarks/b...

We do have an internal enhancement to support this in the future, however it is still currently in our backlog.

Regards,

Phil.

0 Kudos
NickShannon2
New Contributor III

Thanks for the reply. 

To clarify — we are applying the watermark to new photos using the Survey123 field app. 

My question is specific to applying a watermark to new photos for existing data.  Version 3.13 now supports attaching photos to existing data (that is editing a record from the Survey123 Inbox & attaching a new photo).  

As can be seen in the photo below, I've successfully applied the watermark.  My question is:  how do I increase the size of the Defect_No_ in the bottom right corner? 

The Defect_No_ is sourced from data previously entered. 

I've followed the instructions outlined here:  Adding previously entered data from your form.  But becuase I'm working from the Inbox, the instructions don't cover this.  

 

My example: 

bottomLeftWatermark="Lat @[latitude]\nLong @[longitude]\nDateTime @[datetime:short]&size=30" bottomRightWatermark=${Defect_No_}



watermark_photo_test.jpg

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @NickShannon2,

Thanks for the additional information and screenshot, now I understand the problem. This is not related to editing surveys or the Inbox, this is a watermark configuration problem on any image questions.

What you are seeing is expected when you try to reference the value from another field as a component of a greater watermark statement. Due to the way the statement is compiled and processed behind the scenes, you can not combine the variable and size parameters together in the watermark statement. It must be done in another field to give a single text string, and then it can be referenced.

Please refer to the tip in the documentation here:

https://doc.arcgis.com/en/survey123/desktop/create-surveys/watermarks.htm#ESRI_SECTION1_4E32925B1D4B...

Therefore you need to do something similar to the following, and by using a hidden question and null field type, the extra question will not be visible to the user, nor stored in the feature layer, purely it is used for the calculation while the app is open:

PhilipWilson_0-1636604548097.png

I have also attached the example XLSForm i made. Hope this helps, from my testing it works great when adjusting the size.

Regards,

Phil.

 

0 Kudos
NickShannon2
New Contributor III

Hi Philip, 

I tried the calculation step using a hidden question.

I got an error shown in the screenshot below.  This is beause the 'Defect' field does not existing in my Hosted Feature Layer (i.e. existing data). 

I added a new string field to the Hosted Feature Layer called 'DefectNo1' for the purpose of accomodating the hidden question. 

The Survey successfully published, but the defect_no_ was missing from the watermark (see screen cap 2).  

Have you tried editing an Inbox survey and attaching a new photo? 

 

wmgs Screenshot 2021-11-11 141158.jpg

 

 

defect.jpg

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @NickShannon2,

Yes I tested Inbox workflows also, I can open an existing record from the Inbox and add a new image with watermarks, and it submits the image as expected and the size and other watermark details are correct.

If you do not want the new question/field added to your existing feature service, you need to set the bind::esri:fieldType for that hidden question to "null". See my screenshot and example xlsx file. When null is specified in that column, the feature layer does not get updated when you published, and when you submit records, so data is attepted to be submitted for that question/field. From your screenshot above, it appears you did not set the "null".

From your second screenshot, did you take a portrait or landscape photo? It would appear if you use the larger text size that the bottom right watermark would not fit if the bottom left takes up more than half the image width. You may want to move it to another corner, or underneath the bottom left watermarks.

Regards,

Phil.

NickShannon2
New Contributor III

Thank you!!   Sorry, I missed bind::esri:fieldType "null" step .   

Looks great in this screen shot below. 

The abilily to add 'defect numbers' & other attribute information information to photos will be great appreciated by our audits teams. 

Thanks for your help. 

 

255502379_504131617386554_3422305008218056332_n.jpg