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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,258)