cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Hash in URL breaks my Flow

I have a Flow which creates a task in Planner whenever a new row is added to an SQL database. It's been working for over a year, but a month ago it broke because the 'Update task details' action has a 'resource link' which contains a URL that has a # in it.

I've tried replacing the # with %23, which works, but browsers won't replace the %23 with a hash in the resulting task attachment.

 

This is what used to work:

flow-error.png

And the error I'm getting is as follows:


"message": "The request is invalid:\r\nEncountered a metadata reference property 'https://omg.sharepoint.com/sites/a-site/SitePages/home.aspx#/details/1436' in a scope other than an entry. In OData, a property name with a '#' character indicates a reference into the metadata and is only supported for describing operations bound to an entry."

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry, that didn't work, @kamikaze4416, the %23 in the URL was failing to change to a hash unfortunately. 

 

I ended up using the bit.ly connector to create a URL without a #, then passed that into the Planner connector.

View solution in original post

5 REPLIES 5
Super User III
Super User III

Hi @adampope 

 

Try Expression function encodeUriComponent.

 
 
See output below.
 
https%3A%2F%2Fomg.sharepoint.com%2Fsites%2Fa-site%2FSitePages%2Fhome.aspx%23%2Fdetails%2F1436
 


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials

Thank you, @abm I had tried that and the DecodeURIComponent. This does convert the URL as an input:

 

"resourceLink": "https%3A%2F%2Fomg.sharepoint.com%2Fsites%2Fwidgets%2FSitePages%2Fhome.aspx%23%2Fdetails%2F1436"
 
However this is the error I get in the 'output':

 

"message": "Schema validation has failed. Validation for field 'References', on entity 'TaskDetails' has failed: The URI failed to parse. Invalid URI: The format of the URI could not be determined."
 

@adampope i'm pretty sure you've solved it by now but wouldn't this work?:

'https://omg.sharepoint.com/sites/a-site/SitePages/home.aspx%23/details/1436'

Sorry, that didn't work, @kamikaze4416, the %23 in the URL was failing to change to a hash unfortunately. 

 

I ended up using the bit.ly connector to create a URL without a #, then passed that into the Planner connector.

View solution in original post

@adampope 

Could you try using a expression?

If you hover over the ID you should see the body() code. Try and replace it into the concat equation.
Bit.ly is very useful for helping but I am curious if there's a code solution 😂

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,524)