PowerApps: mailto link in Launch

Why?

We tend to put the full mailto-link with a subject and optional body parameter completely in the first part of the Launch function in PowerApps. However in PowerApps it will replace spaces in your email with plus signs 😫.

What?

This is a small post on how to make sure a mailto-link will work with spaces in every possible parameter. Use it for example in the OnSelect propery of an icon or any other selectable control.

How?

So first a formula we are used to

Launch("mailto:"&LabelFeedbackAddress.Text&"?subject="&"Feedback: "&Gallery_KBblocks_Result.Selected.Title&"("&Gallery_KBblocks_Result.Selected.ID&")"&"&body="&"Dear colleague,

Here my feedback on: "&Gallery_KBblocks_Result.Selected.Title)

with this result

Even with a Concat function and even with a Substitute function where you would replace the spaces with a %20 = always those annoying spaces in the email output.

1) When you realize that the Launch function is able to accept name-value pairs we can split the parameters with a formula like:

Launch("mailto:"&LabelFeedbackAddress.Text, "subject", "Feedback: "&Gallery_KBblocks_Result.Selected.Title&"("&Gallery_KBblocks_Result.Selected.ID&")", "body", "Dear colleague, 

Here my feedback on: "&Gallery_KBblocks_Result.Selected.Title)

with this result:

Leave a comment