Survey123 Connect Add Four Watermarks to Photo

1097
7
08-12-2019 05:41 AM
Highlighted
New Contributor III

Hello -

I love the Watermark feature that you can add to photos in Survey123 Connect.  I have been working with generating four Watermarks into one photo via Survey123 Connect. I'm trying to show the following:

1. topLeftWatermark="10 kV muffe- V2" This is the Survey Name - Works fine! 🙂

2. bottomLeftWatermark - Project Nr or Work Order Nr (coming from an input field and then derived from a calculated concat statement, the Concat works, but the Watermark - Does NOT work!

3. bottomRightWatermark - username (coming from an automatic username and then coming from a calculated concat statement, the Concat works, but the Watermark- Does NOT work!

4. topRightWatermark - @[dateTime:short] - Works fine! 🙂

Here is the formula I have written in the bind::esri:parameters column:

topLeftWatermark="10 kV muffe - V2" bottomLeftWatermark=${wm2} topRightWatermark="@[dateTime:short]" bottomRightWatermark=${wm1}

I have attached the Form5.xlsx with all the two concat calculate formulas and the Watermark information for the five photos. 

I was wondering if you could help me to understand why the wm1 and wm2 Watermark instructions do not work, perhaps I'm doing something wrong. I have attached the data view to show that the wm1 and wm2 fields are capturing username and projekt nr. respectively.

Also, at one time I had a user who was testing with me and my photos displayed the Survey Name and Date, but for some reason on his photos that he took, only the survey name displayed and no date information showed as a watermark. So basically the Watermark functionality worked for me, but then it did not work for another user but he had the same version of the survey downloaded.

Thanks in advance for any assistance you can provide me with. Have a great day!

Best regards,

Colleen M. Schelde

Ørsted/Radius Elnet

comas@radiuselnet.dk

Tags (1)
Reply
0 Kudos
7 Replies
Highlighted
Esri Regular Contributor

Hi Colleen,

The behavior that you are encountering is related to an issue which affects watermark statements that reference a field containing a value which does not contain spaces and additional values.  So, for instance, the following will not work...

watermark=${projekt_nr}

 This is because the value in ${projekt_nr} will always be a standalone text value.  A way to workaround this issue is to concatenate the text 'Project Number:', a space " ", and then the value for ${projekt_nr}

watermark=concat('Project Number:'," ",${projekt_nr})

This issue has been raised as a bug, which we will be investigating further.

I have attached an edited version of your XLSForm which you can observe the method that can be applied as a workaround.

Best,

Brandon

Highlighted
New Contributor III

Brandon - 

Thanks so much for your help with this and I have implemented what you have suggested and it does work in the test survey. YEAH!!!

Now, I'm trying increase the text size for all four watermarks to 26, but it does not seem to work for the bottomLeftWatermark - wm1 and bottomRightwatermark - wm2. It works fine for the other two Watermarks. Looks like I can't attach anything here, so here is the Watermark statement I have written:

topLeftWatermark="10 kV muffe - V2&size=26" bottomLeftWatermark=${wm1}&size=30 topRightWatermark="@[dateTime:short]&size=26" bottomRightWatermark=${wm2}&size=30

I've seen where sometimes in the calculate statement you can set the text size, but I dare not mess with the code you provided me with.

Here are the two calculate statements you wrote for me:

concat(${username_value}," ",'_')
concat('Projekt nr:'," ",${projekt_nr})

Not sure where it is appropriate to add the text size statement.

Thanks in advance and thanks so much again for your help with this. I have been pulling my hair out to try and get this to work.

Best regards,

Colleen M. Schelde

Ørsted/Radius Elnet

comas@radiuselnet.dk

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Hi Colleen,

When using values from another field in your watermark statement, you will want to construct any parameters and text that will be used in the watermark in a separate field that will be referenced in the watermark statement.  So, try the following in the calculation column for your wm2 question...

concat('Project Number:'," ",${projekt_nr},'&size=30')

You can then use your watermark placement property to reference wm2, so...

bottomLeftWatermark=${wm2}

Let me know how this goes.  Also, to let you know, we have resolved the issue that was causing the need for additional text when referencing a value in from a previous question in a watermark statement, and it will be available with the next release of the Survey123 (3.6).  There will likely be an opportunity to test this out in a Beta environment if you desire.  To do this, you'll need to access the Beta build via the Early Adopter Community when we have provided an update with the fix.  Hope this helps!

Best,

Brandon

Highlighted
New Contributor III

Brandon -

Thanks so much and this did work like a charm! 🙂

I tried to do it for the wm1 calculate statement and I could not get it to work. I took the font size down to 26 just to see which size looks best. The calculate statements seem a bit sensitive. I'm just happy to see that the wm2 calculate statement worked.

Here is what I tried for wm1:

concat(${username_value}," ",'&size=26','_')

I have a very important question - I'm looking to implement the Watermarks in five surveys using the code you have helped me with and go live very soon. The surveys will be deployed to 60+ people. When the updated Survey123 (3.6) is released will the two calculate statements need to be modified or will they work fine after the Survey123 3.6 update with no impact ?

I'm asking this because to republish and download the newly published surveys for 60+ people is a nightmare (herding cats) to manage. I'm trying to minimize the impact of this.

Thanks in advance and again I really appreciate your help!

Best regards,

Colleen M. Schelde

comas@orsted.dk

Reply
0 Kudos
Highlighted
Esri Regular Contributor

You are right in stating that the calculate statement for the watermark is a bit sensitive.  Once this issue is resolved, it will be a lot less temperamental! The calculation for wm1 that you will want to use in the meantime is the following...

concat(${username_value}," ",'_','&size=30')

These calculations will continue to work once the fix is implemented, however, you will likely want to change them. 

Once fixed, it will no longer be necessary to add additional spaces and text/symbols to the statement.  For instance,

concat('Project Number:'," ",${projekt_nr},'&size=30') can just become concat(${projekt_nr},'&size=30')

Also

concat(${username_value}," ",'_','&size=30') can just become concat(${username},'&size=30')

We should be updating the Beta version of Survey123 withing the next few days, so I would recommend trying this out in Beta once we do.  While the update to 3.6 should not have an impact, it is always best to test before making a decision. I will try to notify you on this thread once the Beta version is available via Early Adopter Community.  Please let me know if you have any additional questions related to this information in the meantime.

Best,

Brandon

Highlighted
New Contributor III

Brandon -

This is really helpful information and thanks so much for always having the right answer. I may hold on implementing the Watermarks on the five surveys I mentioned until after the Survey123 3.6 release. I'd like to make 100% sure that the Watermark functionality works because we had an instance where with the same published survey Watermarks worked great for me, but they did not work for my colleague. You could clearly see he had entered the information that was in the calculate (concat statement) and no Watermark displayed on his photos. So, that may have been apart of the temperamental aspect of the setting up watermarks. It would be really cool if the Watermark setup were apart of the Settings in Survey123. For folks who mostly use the Survey123 Web designer, this would be super straight forward and easy. I have been using Survey123 Connect and at times even my coding abilities are stretched.

Have a great day! 

Best regards,

Colleen M. Schelde

comas@orsted.dk

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Not a bad idea to wait until the final release of 3.6, however, you can test the fix now by downloading the latest version of our Beta!  You can access it here...Survey123 Early Adopter Community.  

As for your request to add the ability to author watermarks using the web designer, we do have an internal enhancement request open to implement this in the future.  I will add note of your interest to the issue.

Thanks for the feedback and let us know if you are able to test out the watermarks using the latest 3.6 Beta!

Brandon

Reply
0 Kudos