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

View solution in original post

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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

MSFTBizAppsLaunchEvent

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (28,637)