I have a Sharepoint List that is populated from a MS FORM using Flow. There is a column that has a URL. I have my FLOW grabbing the items from the list and ading it to a table in an email. I have the email set to use HTML. When I create the table the URL is copied in fine and when the email is sent the link works. What I want to do is have text linked to the URL. For example; I want http://www.website.com/index/intro.html to look like this "Click Here". I added to the Sharepoint list <a href="http://www.website.com/index/intro.html>Click Here</a> and what get put into the table fo the email is "<a href="http://www.website.com/index/intro.html>Click Here</a>" code and all. The odd thing is that I can add the code outside of the table ane the it works. (pictures use a different url than my example)
Here is the flow part :
Seems the HTML will not work in the table. even though the link will work. very odd.
Solved! Go to Solution.
Hi @Galvipa ,
Please try to insert a hyperlink in the HTML table by referring to the method mentioned in this blog.
https://alextofan.com/2019/02/14/flow-how-to-change-the-style-of-your-html-table-in-flow/
Best Regards,
Hi @Galvipa
Use a compose statement to update the html table
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Galvipa
You have to add the text in Compose as an expression
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Yes, I did catch that after I posted this. Thank you for the help though.
Update: I added the compose Expression. I tried using it after the HTML table was created and also after the Customize HTML Table command. I made the column in the SP list to use enhanced rich text to see if that would help. This is what shows in the report in the table of the email. The compose command doesn't seem to change anything as you can see here:
<div><a href="https://company.sharepoint.com/teams/group/Shared%20Documents/docs/ADFS_References.docx?d=w397d8rv0fc7a3cc6874fa9ce1437f5c9">Wiki Link</a></div>
Here is the compose expression:
replace(replace(replace(body('Create_Issue_HTML_table'), '<', '<'), '>', '>'),'"','"')
<a href="https://company.sharepoint.com/teams/group/Shared%20Documents/docs/ADFS_References.docx?d=w397d8rv0fc7a3cc6874fa9ce1437f5ce">Wiki Link</a>
Hi @Galvipa ,
Please try to insert a hyperlink in the HTML table by referring to the method mentioned in this blog.
https://alextofan.com/2019/02/14/flow-how-to-change-the-style-of-your-html-table-in-flow/
Best Regards,
@v-bacao-msft That was it. Basically had to build the table from scratch. Create the STYLE object and call the values in a string variable.
When adding the link just add the href to the line in the table string:
The rest is explained in the link. Thank you very much for your help and everyone's input.
As It is observed, CreateHTMLTable converts < to < and > to > when reading data from array, as it considers < and > as a input data.
While to have <a> markup to work, replace approach works every time.
Example Table contains -
{
...
link : "<a href= \"https://samplelink.tonewplace.com/person\">click here</a>"
...
}
gets converted to something below due to CreateHTMLTable -
<tr><a href= "https://samplelink.tonewplace.com/person">click here</a>
So, When we replace as said earlier
Example table becomes -
{
...
link : "::a href= \"https://samplelink.tonewplace.com/person\":;click here::/a:;"
...
}
After CreateHTMLTable, result is similar to -
<tr>::a href= "https://samplelink.tonewplace.com/person":;click here::/a:;
So, now using Compose to replace the combination of characters, used earlier -
<tr>::a href= "https://samplelink.tonewplace.com/person":;click here::/a:;
becomes -
<tr><a href= "https://samplelink.tonewplace.com/person">click here</a>
Now above result can successfully be used as part of email. As we are not replacing any > or < there should not be any scripting issues. however, a different combination can be used too (when :: or :; are part of original message to be shared)
This solution worked perfectly for me.😊
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.