cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bluelemon247
Frequent Visitor

URL value error - A URL field contains invalid data

Hello wonderful community of helpful people,

 

Hoping you can help with an intermittent issue i'm having regarding the URL.

Please see flow below

Error message - "Invalid URL value.

A URL field contains invalid data. Please check the value and try again.
clientRequestId: 449d2f9c-4e3d-4550-900f-018d295f7437
serviceRequestId: 449d2f9c-4e3d-4550-900f-018d295f7437" 

 

This error message comes up in other flows I have as well but only for certain folders - I wonder if its because the URL is too long? Is there a way of by-passing this?

https://XXXXXXXXXXXX.sharepoint.com/sites/XXXXXXXXXX/Documents/Forms/AllItems.aspx?useFiltersInViewX... - this is an example of a link that breaks it (I added the X's for anonymity) 

 

For context this is what the flow is supposed to do - 'For a selected file' - change the column value - 'update file properties'

Screenshot 2022-04-22 at 10.46.50.png

6 REPLIES 6
stacyjpelletier
Frequent Visitor

I am having a similar problem and posted about it today.  I hope we get an answer 🙂

bluelemon247
Frequent Visitor

I may have a fix to this but works with some projects and not with other - but thought it worth posting in case it helps you @stacyjpelletier .

For the URL field that requires filling I use an ETag instead see photo below. You first need to use 'Get File Properties' and then select the ETag from that. I hope this helps you 🙂 

Screenshot 2022-06-16 at 09.10.31.png

stacyjpelletier
Frequent Visitor

Thank you, I will try this. 🙂

Oliver01
New Member

The issue usually occurs when the URL has more than 255 characters. Very annoying limit. Took me forever to figure out a way around it. So here is what you can do:

1. Instead of using the Hyperlink field, use multiple lines of text field. 

2. Go edit your column, and in format column with JSON field, paste in the following code:

{ 
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", 
    "elmType": "a", 
    "txtContent": "=if(@currentField, 'URL Link', '')", 
    "attributes": {
        "target": "_blank", 
        "href": "@currentField" 
    }
}

Credit: https://sharepoint.stackexchange.com/questions/288082/how-to-convert-text-to-url-in-multi-line-text 

3. You can input the URL from Form as normal to that field in Power Automate.

 

Hope this helps! 

 

Hi Oliver01, Thank you for replying to this, I had given up hope of an answer! My apologies, but would you mind explaining this a bit more? I knew it was to do with the length of the URL which i agree shouldn't be limited (very annoying intermittent error) - I have just been living with the occasional failed flow.  

Screenshot 2023-01-30 at 16.36.28.png 

I have tried doing as suggested and looked at the link provided but I'm not sure what I'm looking for as there is no URL Column listed? Help would be very appreciated - this may be because its a library rather than list?

Thank you 

Kate

Oliver01
New Member

Hi Kate, 

 

I haven't personally used library, so I cannot say if that's the case. 

 

This method is more like a work-around to the character limitation of using a hyperlink column. You are not going to create a URL column, you will need to create a multiple lines of text column for the field you want to store your URLs. (Make sure it is multiple lines of text, because single line of text has the same character limitation as the hyperlink field)

Oliver01_0-1675097729312.png

The detailed setting for that multiple lines of text looks like the following: 

Oliver01_1-1675097930723.png

Choose "Plain text", and in the Column formatting box paste in the JSON code:

{ 
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", 
    "elmType": "a", 
    "txtContent": "=if(@currentField, 'Link to Folder', '')", 
    "attributes": {
        "target": "_blank", 
        "href": "@currentField" 
    }
}

Once you save the settings, whatever URL you paste into the cell should automatically turn in to an Hyperlink once you hit enter and save the cell. 

Oliver01_2-1675099188945.png

Let me know if that helps! 

 

Best,

Oliver

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,999)