web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dynamically rename att...
Power Apps
Unanswered

Dynamically rename attachments based on a collections items name

(1) ShareShare
ReportReport
Posted on by 39

Hi everyone,

 

I'm currently developping an app that allows me to scan work clothes that are equiped with RFID chip. More than scanning them, I would like to add picture if necessary. For instant, I've done that : 

 

 

// Button1 / OnSelect Property : 

Set(VarNFC, ReadNFC());


Collect(
 ScannedItemsSAV,
 {
 NFCTag: "601_P" & VarNFC.Identifier,
 Attachment: Form1_1.Updates
 }
)

 

 

This first step of collecting tag in a collection works pretty fine

 

Once my tag is collected, I would like to Attach one document, in this case, a picture from my phone camera.

ℹ I'm using attachment control embedded in an editform, because it is easier for me to patch it in my SP list

 

So I got : 

 

 

// EditForm / Attachments_DataCard1 / DataCardValue1 / AddOneFile Property :

Collect(
 ColAttachments,
 DataCardValue1.Attachments
);
ForAll(
 ScannedItemsSAV,
 UpdateIf(
 ColAttachments,
 true,
 {
 Name: ImmatriculationScannée & ".png",
 DisplayName: ImmatriculationScannée & ".png"
 }
 )
)

// EditForm / Attachments_DataCard1 / DataCardValue1 / Items Property :

ColAttachments

 

 

At that point, If I scan only 1 cloth and took one picture it works I can patch it to SP List, I will find my Attachment rename

 

But as soon as I scan A second cloth and take a second picture (scan_1 => picture_1 = scan_1.png => scan_2 => picture_2 = scan_2.png ), the first picture_1 is rename with scan_2.png, so I got both attachment with the name scan_2.png

 

Here an example of what I want : 

 

renameAttachment.png

Do you have any advice on how to clearly affect 1 collection item to 1 attachment ?

 

Thanks for your help ! 

 

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard