I am creating an HTML table to email periodically w links to the individual items in SharePoint. Is there any way to replace the long, ugly SharePoint link with a shorter hyperlink?
I tried to be clever and use <a href, but it doesn't work.
Solved! Go to Solution.
I am not sure if you resolved your problem with generating a user-friendly link when generating an HTML table. After your "Create HTML table" action, add a Compose action with the following Expression:
replace(replace(replace(body('Create_HTML_table'),'<','<'),'>','>'),'"','"')
That should do the trick for you.
Regards,
David
Hi, @jesslynh, what SharePoint link are actually referring to?
It might be a good idea to:
You can obfuscate where necessary, but it really helps provide context not just to those helping, but to those who maybe have the same or similar issues.
I'm using the 'Link to Item' returned by SharePoint.
Here is a view of my flow. I tried this a couple of ways
The HTML table 2 is using the output of the Select statement
Used href from Select
Using the href format
Hi @jesslynh ,
Maybe you could write the HTML code manually, i have made a test for your reference.
1. Here is my SharePoint List.
2. Here is my Flow.
<tr>
<td>Dynamic Content</td>
<td>Dynamic Content</td>
<td><a href="@{items('Apply_to_each')?['{Link}']}">Link</a></td>
</tr>
<!DOCTYPE html>
<html>
<style>
table, th, td {
border:1px solid black;
}
</style>
<body>
<h2>Report Test</h2>
<table>
<tr>
<th>ColumnName1</th>
<th>ColumnName2</th>
<th>Link</th>
</tr>
@{variables('varhtml')}
</table>
</body>
</html>
Result Screenshot:
Best Regards,
Charlie Choi
OK, well, @jesslynh ... to make a super simple sharePoint link to an item all you have to do is construct it using the site, the list name, and the ID.
A concat() function in an expression can build an item link, which will then display accordingly.
The below first example shows placeholders which are case sensitive, but you can get these dynamically, see my example for you afterwards:
|
For example, your Select action: |
|
Hopefully that's not too daunting, but all I did there, was take the start of the link, before it gets complex, and then add the part which brings up an item on the screen.
Broken down that's:
🙂
This will work for anyone that has access to the list / item, of course.
---
There are more complex ways of handling this (in my head there's a shortcode generator, but that's a project), but that's the most simple, and it's even shorter than the 'coded' ones that SharePoint insists on generating for you when you're inside a list.
I've delved into the coded ones in this answer, here:
I am not sure if you resolved your problem with generating a user-friendly link when generating an HTML table. After your "Create HTML table" action, add a Compose action with the following Expression:
replace(replace(replace(body('Create_HTML_table'),'<','<'),'>','>'),'"','"')
That should do the trick for you.
Regards,
David
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
67 | |
24 | |
16 | |
16 | |
12 |
User | Count |
---|---|
116 | |
35 | |
32 | |
28 | |
26 |