cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Advocate I
Advocate I

Re: Hash in URL breaks my Flow

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
Highlighted
Super User
Super User

Re: Hash in URL breaks my Flow

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
Highlighted
Advocate I
Advocate I

Re: Hash in URL breaks my Flow

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."
 
Highlighted
Resolver II
Resolver II

Re: Hash in URL breaks my Flow

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

Highlighted
Advocate I
Advocate I

Re: Hash in URL breaks my Flow

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

Highlighted
Resolver II
Resolver II

Re: Hash in URL breaks my Flow

@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
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (8,680)