cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adampope
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, @Anonymous, 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
abm
Super User
Super User

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."
 
Anonymous
Not applicable

@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, @Anonymous, 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.

Anonymous
Not applicable

@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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,965)