I am trying to parse a JSON string for multiple URLS in the below text from "HTTPS" to the ",". I have code working that grabs the first URL perfectly but I am unsure how to loop through and get all the URLS separated out.
Looking for four links formatted like this
https://m365x500140.sharepoint.com/sites/Mark8ProjectTeam/_layouts/15/Doc.aspx?sourcedoc=%7BB39CCDF3...
Solved! Go to Solution.
Hi @Steve0
You want to use a select action. Make sure you turn on text mode for the select and insert the dynamic value for link. It will return and array of links.
Damien
Here is how I solved it for others to leverage
Hi @Steve0
Just an observation, looks like you're creating markdown, maybe for PVA? You don't need the HTML to Text step as it removes HTML tags <br> <table> etc from raw HTML. You are simply dealing with values from an object, which are already text strings in your case.
There is actually a post from this week about achieving this in PVA Solved: Re: PVA Return Sharepoint Files unable to Return I... - Power Platform Community (microsoft....
The select method I mentioned would look as follows:
The output of the select gives you an array of names and links in the markdown format and then you use join() to bring those objects together as a string.
If you want to add a return line to the string, you can join on decodeUriComponent('%0A'). The attached post also shows you how to bullet mark the list - if that's what you are looking for.
I noticed whilst testing this that PowerAutomate will sneakily remove the " " on the select when you return to the flow to edit. The alternative to the screenshot I have provided is to construct a concat.
Concat('[',item()?['{Name}'],'](',item()?['{Link}'],')')
broken down that is:
Concat('[', //opening square bracket
item()?['{Name}'], //file name
'](', //closing square bracket and opening bracket
item()?['{Link}'], //file link
')') //closing bracket
Hope that helps with understanding - even if it's not used for your solution right now 🙂
Damien
Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts
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 |
---|---|
45 | |
16 | |
15 | |
14 | |
13 |
User | Count |
---|---|
77 | |
38 | |
27 | |
18 | |
18 |