Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Add a link to pre-filtered list view into SharePoint column

Posted on August 18, 2024August 17, 2024 by Tom

“I’d like to give users a possibility to simply click on a link in SharePoint view and be redirected to logs list pre-filtered for given item.”


When building any flow in Power Automate, I always recommend creating your own list with logs. Not only to keep approval history forever, as in my approval template, but to keep any important information. Anything you might need after the 30 days when Power Automate automatically removes the flow run history.

But it’s one thing to have the information and another to access it. Once you start logging it’ll create a lot of entries, a lot of items in the SharePoint list. And the more items you have, the harder it might be to find what you’re looking for. That’s why I like to add some easy filtering options.

Add it directly to the item

The easiest way is to add a link directly to the item. A dedicated column where users can click and it’ll redirect them to the logs list, pre-filtered for the selected item.

It’s a combination of two solutions I already explained – a JSON formatting to add a hyperlink and a link to pre-filtered SharePoint list.

As with the JSON formatting, you must add another column. It doesn’t matter what type of column as its value will be overwritten by the JSON so let’s keep it Single line of text.

Get the link

The next step is to prepare the link using the unique identifier of the request, let it by the SharePoint ID or a custom column. Go to the list with logs and apply a random filter on the unique value column. Copy the url and search for the ID you selected. On the example below I’m filtering by the REQ-00004 title.

That’s the url you want to use in the JSON column while replacing the specific id with the item value, e.g.

https://xxx.sharepoint.com/sites/Approval_DEV/Lists/ApprovalHistory/AllItems.aspx?FilterField1=LinkTitle&FilterValue1=<UniqueValueFromItem>&FilterType1=Computed

Use it in the item

Once you know what link to add you can start with the column JSON formatting. The difference from the previous article will be in the ‘txtContent’ – the text in the column, and the ‘href’ – the actual link.

Since there’s a dynamic part in the link, the one taken from the SharePoint item, you can’t use the link right away. If you did, it’d apply the same filter for all SP items – that’s not the goal.

Take the first part, before the unique id, that one will be the same for all items up until the ‘=’ character. Then comes the dynamic part referencing the column with the unique id by its internal name. The last part is then everything after the unique id, again, a fixed value.

Added to the JSON code it might look as below (my column name is RequestID).

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "Flow logs",
  "attributes": {
    "target": "_blank",
    "href": "='https://xxx.sharepoint.com/sites/Approval_DEV/Lists/ApprovalHistory/AllItems.aspx?FilterField1=LinkTitle&FilterValue1=' + [$RequestID] + '&FilterType1=Computed'"
  }
}
SharePoint pre-filtered list view link

Once you save it it’ll add a clickable link to each item in the list. This link will send users to the logs list while filtering only items for the specific request.

SharePoint pre-filtered list view link

Summary

When you store long term flow logs, you must think also about how to access them. You could just keep them in a single list and always apply the desired filter, or you can optimise it a bit. Add a new column to the main SharePoint list with a link leading to a pre-filtered list view. No need to remember any IDs or mess with the views on the logs list, just a single click to see what you want.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes