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

encodeUriComponent is deleted on saving and then reopening flow (which breaks uri GETs)

Background

I have a flow which formats an email subject line into part of a uri. The subject line is saved in a variable so the code to achieve this is encodeUriComponent(variables('SubjectLine'))

 

When entered into the flow it appears as an expression (there's some other text to the left of %20ALARM): image.png

Once entered the encodeUriComponent works fine and sends correctly formatted uris, for example this is what arrives in a debug email: 

image.png

Bug time

When the flow is opened after saving it, if we view the same piece of code the expression encodeUriComponent has been removed! 

image.png

... and note that nothing has been editied at this point, we are just clicking into boxes to open them. If we save & close the flow window and let the flow fire again now the uri is broken...

image.png

... which breaks the http GET request because there's a space in it. 

 

So in summary, if you use encodeUriComponent the action is as intended until you reopen the flow and resave it (without editing anything) which then removes the encodeUriComponent functionality.

 

Surely that is not intended behaviour!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: encodeUriComponent is deleted on saving and then reopening flow (which breaks uri GETs)

Hi @GrahamBristol,

 

Thanks for feedback. According to your description, I made a simple test using function encodeUriCompoment, it returned the same result with you.

 

Please check the WDL doc on encodeUriCompoment function, it says that consider using uriCompoment, rather than encodeUriCompoment. Although both functions work the same way, uriCompoment is preferred.

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#e...

 

Then I made a test using uriCompoment, though I reopen the flow and resave it, uriCompoment functionality won’t be removed.

 

Please take a try with it on your side. Hope this could be a reference for you.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: encodeUriComponent is deleted on saving and then reopening flow (which breaks uri GETs)

Hi @GrahamBristol,

 

Thanks for feedback. According to your description, I made a simple test using function encodeUriCompoment, it returned the same result with you.

 

Please check the WDL doc on encodeUriCompoment function, it says that consider using uriCompoment, rather than encodeUriCompoment. Although both functions work the same way, uriCompoment is preferred.

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#e...

 

Then I made a test using uriCompoment, though I reopen the flow and resave it, uriCompoment functionality won’t be removed.

 

Please take a try with it on your side. Hope this could be a reference for you.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

GrahamBristol
Level: Powered On

Re: encodeUriComponent is deleted on saving and then reopening flow (which breaks uri GETs)

Hello  @v-yamao-msft

 

Thanks very much for the help. This fixed the problem. 

 

Graham

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,226)