Select to view content in your preferred language

Not your standard "Note" question; email link

18060
52
Jump to solution
05-09-2017 04:14 AM
by Anonymous User
Not applicable

Hello,

I am attempting to use a "Note" question to create a hyperlink to launch an email containing information from my Survey123 form that was built within Survey123 Connect v2.0.35.

I have a set of 6 questions that pertain to project details that I am having our project managers fill out through the Survey123 app. I have a text question that is set to multi-line that contains some text and also pulls in the answers to the 6 questions to create what will be the body text of the email (please see below).

"Hello GIS Department," + "\n"+ "\n"+"This is a request to set up a new GIS application with the following information below:" + "\n"+ "\n" + "Project Number: " + ${ProjectNumber} +"\n" + "Project Name: " + ${ProjectName}+"\n" + "Site Name: " + ${SiteName}+"\n" +  "Company Name: " + ${CompanyName}+"\n" + "ESI Project Lead: " + ${ESI_ProjectLead} +"\n" +  "ESI Field Lead: " + ${ESI_Field_Lead} + "\n" + "\n"+ "Thanks"

Next I have a "Note" question that has a calculation to pull together the hyperlink text that is needed to launch an email and then allow the user to send off the email. That works perfectly (see below).

concat('<a href="mailto:',${Email_Name},'?subject=GIS App Setup&body=',${Email_Body_Text},'">Link to email info</a>')

Next, I want the user to submit the survey form, but this is where things hang up. I receive an error code 1000 "String or binary data would be truncated. The statement has been terminated."

Can anyone provide some insight on what this error means and how to get around the error to allow the survey to be submitted?

Ismael Chivite

James Tedrick

I would greatly appreciate any help or insight.

Thank you in advance,

Mike

52 Replies
by Anonymous User
Not applicable

I've incorporated this feature into a couple of my surveys. And I love it

But, I haven't yet figured out how to include a result from a field in the subject line.

Any suggestions?

Thanks

Gee

0 Kudos
by Anonymous User
Not applicable

Gee,

   I think you should be able to change the variable within the subject (bold text) portion of the concatenated hyperlink to match that of the field you would like to insert data from into your subject line.

concat('<a href="mailto:mbruening@envsi.com;ckemmerer@envsi.com?&cc=',${EmailNamePass},

'&subject=',${InsertYourQuestionName},'&body=',${Email_Body_Text},'">Link to email info</a>'

I have not tried this, but that is my guess since we can use question values such as the "${Email_Body_Text}" to insert into the body parameter of the concat() string.

I hope this works for you.

Mike

by Anonymous User
Not applicable

Gee, just wondering if you were able to get things working with the subject line and inserting your results?

0 Kudos
by Anonymous User
Not applicable

Yep, thanks so much

MariaSlowik
Emerging Contributor

Hi I have the same problem with submitting the survey. When I have a html with "=" it failing to submit the survey, but when I don't have "=" it's not reading it as a hyperlink. Also I noticed that it's reading the quoted text but not fields.I would happily send an example of my survey, as I tried most of the solutions given here but they still don't work for me. I really don't know where is the problem. 

Many thanks,

Maria

0 Kudos
by Anonymous User
Not applicable

Maria,

   I think you will need to add into your survey values for the following two columns within your XLSX in order to specify the type of data field and then the length of the field that you are using. The idea is that you will have to give some thought to the number of characters that could be included within the concatenated values for each of your questions and then buffer them by a little bit. Each of the concatenated values are stored within the Hosted Feature Service.

Currently since you did not set up these two fields the default values are being used and this could most likely be why you are not able to submit the surveys. Most Likely you will assign them to be "esriFieldTypeString", but the lengh of the field will depend on the number of characters being used.

I hope this helps!

Mike

0 Kudos
MariaSlowik
Emerging Contributor

Hi Mike, 

Thank you fro such a quick reply. I Did what you recommended but it still doesn't work. Everything looks and work so well in Form Preview in the desktop version and as soon as I publish the survey e-mail body is has a message NaN and it doesn't take anything except quoted text. 

Any ideas? Thank you a lot for your help. Sorry. I attached wrong version. Now should be ok. 

0 Kudos
by Anonymous User
Not applicable

Maria,

We are utilizing this with the field app and not the Web-based survey form. I have not tested this against the Web-based survey form and I am unsure about trouble shooting this one. We are heavy using the field based app and I have not explored the web form for our workflows yet. I am heading on vacation for the next week and half and will not be able to take a look until I get back.

I just wonder if anyone else on this thread has done so; anyone?

0 Kudos
MariaSlowik
Emerging Contributor

Mike,

Thank you a lot for your help and time.  

I understand. I will try it on the filed app and for website version I think I will try the GeoEvent. 

Have a nice holiday!

Maria

0 Kudos
ChrisSnyder1
Emerging Contributor

Hi Mike, 

Curious if you have an answer to the web form question or if anyone else has gotten this to work. I want to pass parameters that are typed into one survey form and then send them to another.  I'm not clear on whether the parameters you are passing are passed before the 1st survey is submitted or after the first survey is submitted and then the hyperlink is opened to the new survey. Is it possible to use a url scheme to pass parameters from one survey form to another? and can you do it before submitting survey #1 or after?  Thanks to anyone who can assist! My sample URL link is here....

concat('<a href="https://survey123.arcgis.com/share/1f16c2a2e9fb435d8f3c5f4a7f622f?field:Address=${Address}&field:Online_Test=${Online_Test}">Link</a>')

Ismael Chivite

Brett Stokes

0 Kudos