@Reza I am attempting to use the sample app that you provided ("Multiple Attachment App") from
https://github.com/rdorrani/PowerApps/tree/master/Attachments
I am having trouble understanding the code in the buttons (specifically the "RemoveIf" part--to me it would make more sense if we were removing the "Travel" values here?):
ClearCollect(
colProjectAttachs,
DataCardValue7.Attachments
);
UpdateIf(
colProjectAttachs,
!StartsWith(DisplayName,"Project-") ,
{
Name: "Project-" & Name,
DisplayName: "Project-" & DisplayName
}
);
RemoveIf(
colFinalAttachments,
"Project-" in DisplayName
);
Collect(
colFinalAttachments,
colProjectAttachs
);
More specifically, for my use case I have "Source Docs" in one attachment column and "Final PDF" in one attachment column. The "Final PDF" is named [FormNumber.pdf] from a FormNumber value column in the list.
The Source Docs attachment column contains all the attachments (regardless of name), except for the Final PDF, and the Final PDF attachment column has only the Final PDF in it. So essentially the only name I need to set is for the Final PDF, leaving the other attachments alone.
I just need a better understanding of what the buttons do so that I can modify the code for my purpose.
And, I am also missing some setting or code somewhere, because I am not understanding what is limiting each column to it's associated attachments.
Thank you!