cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

HTML in Sharepoint List

I have a form that has a 'document upload' option and was hoping that the web link would transfer into the Sharepoint list and work as a list, but the field has loads of other gibberish in it so the link doesn't work in the list. 

Is there any way to remove the other parts but only keep the URL (within the yellow lines)?

html.PNG

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Underneath the schema box you should have a "Generate from example" button or link. Click that, and paste in the same example that you used in your initial questions. That will generate a schema which should be sufficient.

When the Parse JSON step has been executed, you should have access to an object called "link" that contains the url.

 

I dont have any experience of MS-forms to sharepoint tasks. How is the recieving field defined in the sharepoint list? What happens if you use the "Hyperlink" field type? 

View solution in original post

8 REPLIES 8
Microsoft
Microsoft

When you say "was hoping that the weblink would transfer into the SharePoint List and work as a list" what do you mean?  How is the link even being generated or where is it coming from?

Helper III
Helper III

You've got what looks like a JSON object here.

I think you need to use the "Parse JSON" action to extract the "link" field to a (string) variable and post that to Sharepoint.

 

Sorry I wasn't clear. This text is generated as part of the 'file upload' through Microsoft Forms. In the Excel output of the Form data, it's just a link to the uploaded file in SharePoint, but when the information is automatically put into a SharePoint list, it doesn't give me just a link, it puts more text around the link too, therefore making the URL unclickable. 

I want to remove all text around the URL so I can use the HTML field type.

Hi @ThePusscat 

 

Do you mind helping me out with what I need to put in the Schema section to make it work?

 

Thanks

Underneath the schema box you should have a "Generate from example" button or link. Click that, and paste in the same example that you used in your initial questions. That will generate a schema which should be sufficient.

When the Parse JSON step has been executed, you should have access to an object called "link" that contains the url.

 

I dont have any experience of MS-forms to sharepoint tasks. How is the recieving field defined in the sharepoint list? What happens if you use the "Hyperlink" field type? 

View solution in original post

Hi @ThePusscat 

 

This works perfectly thank you!! The ONLY issue I have is that when an Excel file is attached, the following is added to the end of the link so it fails, even though the link works with it. I guess there is no way of the parse json to know file types are in the links. 

 

www.sharepointname.com/me/file/formname/documentname.xlsx&action=default&mobileredirect=true

 

It works fine with PDF but I don't want to restrict users to only uploading them.

 

The above works perfectly with the Hyperlink option in a SharePoint list, before it would fail due to all of the other stuff in it. Because of that I had to change it to Multiple Lines and it was just pure text then.

 

To be honest I would probbaly just kludge that situation, ie: use string handling on the returned "link", looking for the "&" character and substringing from the start upto that point, thus truncating the returned link.  

 

*However* this does rely on the "&" character having been URI encoded if it actually appears in the filename itself.

 

ie:  My File & Data.xlsx&action=blah   >   My%20File%20%26%20Data.xlsx&action=blah  if this is how your link is returned when the filename contains a "&" character, the find/truncate will work ok. if not, it will truncate the filename to >MyFile < !

 

I don't know of a PowerAutomate function that will remove the link parameters... perhaps someone else does...?

 

Yeah I'm not sure at all. Luckily I managed to convince my user to turn off Excel uploads and I'll hope it never happens to PDF or image uploads!

 

Thanks for your help though, I learnt something new 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (9,056)