Select to view content in your preferred language

Survey123 URL inside Mailto issue

794
0
09-28-2023 06:01 AM
RyanWilbanks
New Contributor

I created a dashboard where I use a popup within the map so anyone can email  links to specific records in survey123 to edit. I have it in different dashboards and far as I knew it was working. However, I am having issues with different mail clients. My default client is Outlook and when the Mailto hyperlink is opened it populates the link within the email body and I am able to click on it from the desktop or mobile device to open it. I have someone else using it and the link was not opening the correct record, it was opening a new blank record. After looking into it, I found they are using Microsoft mail client and when the popup link is clicked it opens the client and populates the email with all the correct information but changes the URL format. Where Outlook keeps the "&" symbol Microsoft mail and Gmail changes it to "&" and the link does not work. I tried using Arcade UrlEncode for "&", which converts it to "&26". When I paste the link into the browser and it opens Survey123 app I get an error "Survey Not Found" but below that the url link seems to be correct with "&".

Has anyone else had this problem? What did you do to fix it?

This what I am using to create the mailto and survey123 URLs.

Under the popup within a text window I create a hyperlink using the following.

This works in for outlook.

mailto:{Email}?Subject=Work Order Number: {Work_Order_Number}-{Work_Location_Number}&body=Inspection Type: {Inspection_Type}%0D%0A Inspector: {Inspector} %0D%0A Follow-up Action: {Determination} %0D%0A Due Date: {expression/expr0} %0D%0A Go Back Status: {Goback_Status} %0D%0A Observation Notes: {Observations}%0D%0A%0D%0A {expression/expr2}

 

({expression/expr2})

var surveyrecord = 'https://survey123.arcgis.app?itemID=####&action=edit&q:globalID='+$feature.GlobalID+'&update=true'

var link = surveyrecord

return link

 

I tried formatting the expression as this and it replaces the & with &26 but gives the error "Survey Not Found"

mailto:{Email}?Subject=Work Order Number: {Work_Order_Number}-{Work_Location_Number}&body=Inspection Type: {Inspection_Type}%0D%0A Inspector: {Inspector} %0D%0A Follow-up Action: {Determination} %0D%0A Due Date: {expression/expr0} %0D%0A Go Back Status: {Goback_Status} %0D%0A Observation Notes: {Observations}%0D%0A%0D%0A {expression/expr2}

 

var symb = UrlEncode('&')

var surveyrecord = 'https://survey123.arcgis.app?itemID=######+symb+'action=edit'+symb+'q:globalId='+$feature.GlobalID+symb+'update=true'

var link = surveyrecord

return link

 

Also tried using this arcade format and it works in outlook but not the other two.

var urlsource = 'arcgis-survey123://?';

var params = {

  itemID: '######',

  action: 'edit',

  'q:globalId': $feature.GlobalID,

  folder: 'inbox',

  update: 'true'

};

return urlsource + UrlEncode(params);

 

Any help would be appreciated.

0 Kudos
0 Replies