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 :
Do you have any advice on how to clearly affect 1 collection item to 1 attachment ?
Thanks for your help !

Report
All responses (
Answers (