
i currently use the formula down below t o get the attachments from my attachment control and to make a pdf of the powerapp screen which gets send to my email. now the problem is that i have alot of datacards and when i add them in i get send multiple pdf's which i dont want. I want it to send only one pdf with all the data from the datacards and the files from the attachment control
// Add all attachments to a collection.
ClearCollect(colAttachments,ForAll(DataCardValue3_1.Attachments,{Name:Name,ContentBytes:Value}));
Collect(colAttachments,Table({Name:"Test.pdf",ContentBytes:PDF(veiligheid)}));
Collect(colAttachments,Table({Name:"Test.pdf",ContentBytes:PDF(Info)}));
// Send email, pass all attachments using the collection.
Office365Outlook.SendEmailV2("email@email.com","Subject","Email Body",{Attachments:colAttachments});
Hi @Anonymous,
I believe the PDF function can accept only one screen or one control, so we cannot "bundle" several screens and controls together:
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-pdf
However, a workaround would be to have a screen showing all the information you need then call the PDF function for that screen which will include everything.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Follow me online.