web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Link to Sharepoint fil...
Power Automate
Unanswered

Link to Sharepoint file in a HTML table- replace expression doesn't work

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I am trying to build a flow that sends a table with selected columns that comprises a list of files based on a condition (a column that has either a yes or no input). 

It all works as intended but the only thing that I can't figure out is the link to the file in SharePoint comes out too long. I am trying to use the Concat and replace expression to "clean" it up but it doesn't seem to work:

the entire flow:

Idan_0-1707371482257.png

and here are the select expressions:

Idan_2-1707371644484.png

the concat formula:

          concat('<a href="', item()?['{Link}'], '">', item()?['Title'], '</a>')
 
The compose step:
Idan_3-1707371732747.png

Compose Formula

replace(replace(replace(replace(replace(body('CreateTable'), '&lt;''<'), '&gt;''>'), '&amp''&'), '&#39;''"'), '&quot;''"')

 

This is the output I am getting:

Idan_4-1707371808231.png

 

Please let me know what I am doing wrong.

Thanks!

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at
    Re: Link to Sharepoint file in a HTML table- replace expression doesn't work

    Hi @Idan ,

     

    I've made a test for your reference:

    1\My flow

    vbofengmsft_1-1707374109688.png

     concat('<a href="', 'https://www.bing.com', '">', 'Click Me', '</a>')
    replace(replace(replace(body('Create_HTML_table'),'&lt;','<'),'&quot;','"'),'&gt;','>')

    2\Result

     

    vbofengmsft_0-1707373998985.png

     

    Best Regards,

    Bof

     

  • Idan Profile Picture
    on at
    Re: Link to Sharepoint file in a HTML table- replace expression doesn't work

    Thanks Bof- it helped steer me in the right direction, however I am still missing one part.

    If I write 'Click me' then it does indeed provide the link, however I want instead of "Click me" appearing, for the link to have the name of the file- for some reason when I have the following expression I get empty cells in the table:

     

         concat('<a href="',item()?['{Link}'], '">', item()?['Title'], '</a>')
    Idan_0-1707442290501.png

     

    Any idea why?
  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: Link to Sharepoint file in a HTML table- replace expression doesn't work

    Hi @Idan ,

     

    Based on your description, the value of item()?['Title'] is empty. Please check the output of the filter array.

     

    Best Regards,

    Bof

  • Idan Profile Picture
    on at
    Re: Link to Sharepoint file in a HTML table- replace expression doesn't work

    It works! Thank you so much for your help, I have been scratching my head for the last 2 days!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard