You are viewing limited content. For full access, please sign in.

Question

Question

URL in email service task break link on spaces in Dynamic fields

asked on October 22, 2020 Show version history

We have the following logic in the body of an email service task: 

{/dataset/EnvironmentBaseURL}Forms/SupervisorReview?Report___={/dataset/Report___}&Approver_s_Name_={/dataset/Supervisor_s_First_Name_}%20{/dataset/Supervisor_s_Last_Name_}&Employee_s_Name_={/dataset/Injured_Employee_s_Name_First}%20{/dataset/Injured_Employee_s_Name_Last}&ID={/dataset/_instance_id}

 

The problem is that if there is a Title or other space (for example SGT Frank) in the first name, or last name (example Castle Sr) , the entire URL brakes.  I have looked at adding a regular expression or try to url encode the entire string, but I am losing the dynamic vars. 

 

Any thoughts or assistance is much appreciated.

0 0

Answer

SELECTED ANSWER
replied on October 23, 2020

So I was able to address this by going into the HTML view of the Email Body and embed the entire set of vars in an Href tag, then provide a display name like so:

 

<a href>{/dataset/EnvironmentBaseURL}Forms/SupervisorReview?Report___={/dataset/Report___}&Approver_s_Name_={/dataset/Supervisor_s_First_Name_}%20{/dataset/Supervisor_s_Last_Name_}&Employee_s_Name_={/dataset/Injured_Employee_s_Name_First}%20{/dataset/Injured_Employee_s_Name_Last}&ID={/dataset/_instance_id}> Continue Approval Process </a> 

0 0

Replies

replied on October 22, 2020

What I might do is build the url encoded path via JS and then save that into a single form field, and use that in the email task. Another alternative approach could be send the email via a workflow task where you can easily URL encode each parameter there.  Hope this helps!

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.