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.'.