Question for everyone. I'm new to Power Apps and want to verify an attachment has been uploaded but I'm not able to grab the name or count the rows in the attachment control. I have attempted to use the onAddFile option with a formula that assigns the name to a variable and attempted to use the CountRows function and assign that number to a variable. Any help would be appreciated.

1 Answer 1


You can both get names of the attachment and the number of attachments with these formulas:

Here you set a variable that counts the attachments. My attachment field is the datacardvalue28, that might differ in your form. You can then use that variable to validate that there is in fact some documents uploaded.

Set(varNumAttachments, CountRows(DataCardValue28.Attachments));

This formula take each file name and put them into a collection you can use verify filetype, names etc. are up to standard in your scenario.

ForAll(DataCardValue28.Attachments,Collect(col_Attachments,{fileName: Name})); 

enter image description here

Hope it works :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.