Hi @Anonymous,
To use multiple attachment controls for file upload with one button press, modify your formula to iterate through each attachment control. Assuming you have controls named DataCardValue3_1, DataCardValue3_2, etc., you can use the following formula:
ForAll(
Concatenate(
DataCardValue3_1.Attachments,
DataCardValue3_2.Attachments,
... // Add more controls as needed
),
'PowerAppV2->Createfile'.Run(
{
file: {
contentBytes: Document.Value,
name: Document.Name
}
}
)
)This formula concatenates the attachments from all specified controls into a single list and then uses ForAll to iterate through that list, running the 'PowerAppV2->Createfile' for each attachment.
Give this a try, and it should help you upload files from multiple attachment controls with a single button press. 😊 Regards! Ali Shahzad