cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vvSTRIDEvv
Frequent Visitor

Displaying SharePoint Attachment Links as List in DevOps Feature

I have a flow that creates DevOps Features, by way of a Power Apps form and SharePoint list. Everything works ok except for 2 things.

 

1. The for each loop to get the links is causing duplicate feature creation (one for each attachment link)

2. The links are not hyperlink

 

I want to somehow concatenate the links to just one feature. Curious if anyone has some more info, thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

@vvSTRIDEvv 

Apologizes for the late reply, I have tried the below on my side and it worked.

1. Initialize string variable after Get Attachments and before the Loop

Mira_Ghaly_0-1649208615416.png

 

2. In the Loop , Add the action append to string variable with below Expression and then pass the URL Arrays String to the Work Item Description body

concat('<a href="',item()?['AbsoluteUri'],'">',items('Apply_to_each')?['DisplayName'],'</a>','<br/>')

Mira_Ghaly_1-1649208672300.png

This is the output on the work item

Mira_Ghaly_2-1649208749680.png

Hope this works for you as well!

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

8 REPLIES 8
Mira_Ghaly
Dual Super User
Dual Super User

@vvSTRIDEvv 

Please share screenshots of your flow and how it is structured.

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
vvSTRIDEvv
Frequent Visitor

@Mira_Ghaly  I'm triggering the flow based on a 'Status' change within the list. Then Initializing the Variable "SharePointAttachmentURI'

vvSTRIDEvv_0-1649095157122.png

Then I am getting the Absolute URI's, which I want to show more than 1. Currently It only shows the last link, I want to show them all. The link is also not a hyperlink, which would be a nice to have.

vvSTRIDEvv_3-1649095695772.png

From there I am creating the feature, outside of the loop.

vvSTRIDEvv_1-1649095529240.png

 

 

@vvSTRIDEvv 

Since you are creating the feature outside the loop so are you still getting duplicate features?

If yes can you check the history to understand if there is more than one instance running per same item in SharePoint..if yes that means that the issue is in the flow trigger..

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@vvSTRIDEvv 

Can you please check this video that explains how to trigger a flow on a sharepoint column change.

 

https://youtu.be/xvmi21KomK0

 

 

 

 

 

 

 

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Thanks! I am not getting duplicates anymore, I apologize I should have specified. After the initial post I moved the feature creation out of the loop. The trigger is working perfectly and I am creating one feature per run. Just the attachment link giving me the trouble.

vvSTRIDEvv
Frequent Visitor

@Mira_Ghaly Ok, I have the attachments links working somewhat. Here is what I did:

vvSTRIDEvv_1-1649174160527.png

 

Then out side the loop, I append the variable:

vvSTRIDEvv_2-1649174235011.png

 

Concat = concat(outputs('Get_URL_From_Loop'),';')

 

This gets me the multiple links, the problem I have is that the links do not come through cleanly. They have '[' and "" around them, and they are not clickable.

 

Here is what the links come through as currently:

["https://software.sharepoint.com/sites/Metrics/Lists/Enhancement Submissions/Attachments/3/Customer List for SharePoint.xlsx","https://software.sharepoint.com/sites/Metrics/Lists/Enhancement Submissions/Attachments/3/Small.png"]

 

What can I do to clean them up?

@vvSTRIDEvv 

Apologizes for the late reply, I have tried the below on my side and it worked.

1. Initialize string variable after Get Attachments and before the Loop

Mira_Ghaly_0-1649208615416.png

 

2. In the Loop , Add the action append to string variable with below Expression and then pass the URL Arrays String to the Work Item Description body

concat('<a href="',item()?['AbsoluteUri'],'">',items('Apply_to_each')?['DisplayName'],'</a>','<br/>')

Mira_Ghaly_1-1649208672300.png

This is the output on the work item

Mira_Ghaly_2-1649208749680.png

Hope this works for you as well!

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
vvSTRIDEvv
Frequent Visitor

Works Perfect!! Thank You!!!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,062)