cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GrahamBristol
Level: Powered On

How do I "EncodeUrl" as per PowerApps?

I wish to use a URL based api from a third party which sends SMS messages based on a http GET request. To format the message I need to convert a string which I have in a variable (which is the subject line of a trigger email) into%20text%in%url%format.

 

Where is the equivalent of EncodeUrl as per https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-encode-decode?

 

image.png

 

Then some time later...

 

 image.png

 

The key is that I need a concatenated URL with "The%20dog%20and%20cat%20are%20fighting%21" in it rather than "The dog and cat are fighting!"

 

I'm sure this must be possible and I have tried a good few things but they all fail to run. 

 

Any one with any thoughts? Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions
GrahamBristol
Level: Powered On

Re: How do I "EncodeUrl" as per PowerApps?

Self help here... answer for the interested reader is:

 

encodeUriComponent(variables('SubjectLine'))

 

image.png

 

...and it's possible that the encodeUrlComponent() is actually unnecessary because when the flow is saved and then re-opened, the encodeUriComponent is removed and shows only as:

 

image.png

2 REPLIES 2
GrahamBristol
Level: Powered On

Re: How do I "EncodeUrl" as per PowerApps?

Self help here... answer for the interested reader is:

 

encodeUriComponent(variables('SubjectLine'))

 

image.png

 

...and it's possible that the encodeUrlComponent() is actually unnecessary because when the flow is saved and then re-opened, the encodeUriComponent is removed and shows only as:

 

image.png

mu3
Level: Power Up

Re: How do I "EncodeUrl" as per PowerApps?

I get this error:

 

InvalidTemplate. Unable to process template language expressions in action 'HTTP' inputs at line '1' and column '2455': 'The template language function 'encodeUriComponent' was invoked with invalid parameters. The parameter at index '0' cannot be converted to URI component.'.

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 52 members 4,238 guests
Please welcome our newest community members: