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

Order SharePoint attachments

Hi, 

I am working on an application that creates a PDF. When a user submits a form a PDF is created using Flow. Then in the powerapp users can submit a new attachments and these PDF's should then merge into 1 PDF. I have this working, but because of the way the attachments are set up it is not in the right order. 

Bob13_0-1642588525153.png

Above is the first attachment that is created.

 

Bob13_1-1642588814503.png

 

 

But then when I want to add more attachments they always add alphabetically like this. But the first attachment is the cover sheet so it should always be the first document in the merged PDF. Now it is sometimes the second or third, depending on the names of other added attachments. Is there a way that the attachments can be saved based on when they are added? This cover sheet is always added first, so if the users then add new documents it should work.

 

Thank you in advance for your time

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Bob13 ,

Unfortunately, there is no property on the Attachments that refers to the order or date they are attached, so PowerApps simply sorts them alphabetically.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @Bob13 ,

Unfortunately, there is no property on the Attachments that refers to the order or date they are attached, so PowerApps simply sorts them alphabetically.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Ok, thank you for your reaction

Connel
New Member

I had a similar situation only I was using the attachments card in a powerapps form to add the files to a SharePoint list from a collection. I got around the issue by adding numerical values at the start of each file name. I got lucky because I was already generating the names with a function so I just added a CountRows(ListName.Attchments)+1 & to the front of my function so the alphabet ordering just put them in the order added.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,434)