web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps Attachment C...
Power Apps
Unanswered

PowerApps Attachment Control Uploaded File Size Validation

(0) ShareShare
ReportReport
Posted on by 2

We are using the Power Apps Attachments control to upload files like word documents, excel sheets etc. By using PowerApps without Flow How to validate the uploaded file size is greater than 0 KB or not? if the file size is 0 KB then display error message to the users.

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @rkgoriparthi ,

     

    The file size can only be judged after the user uploads it.

    If the file size is 0KB, delete the file, otherwise keep it.

     

    I assume you save the attachments to the attachment column in list.

    I did a test for you.

     

    1\ This is my flow 'Test50'.

    v-xiaochen-msft_1-1619762238990.png

    Id: Ask in powerapps

    v-xiaochen-msft_3-1619762342217.png

    Value:div(int(length(string(outputs('Get_attachment_content')?['body']))),1024)

    v-xiaochen-msft_4-1619762399326.png
     
    2\ Set the submit icon Onselect property to:
    SubmitForm(your form);Set(A,Test50.Run(your form.LastSubmit.ID,your form.LastSubmit.ID).thevar3)
     
    3\ Add a label control and set its Text property to:
    A
    v-xiaochen-msft_7-1619763010139.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.
  • rkgoriparthi Profile Picture
    2 on at

    How to validate the uploaded file size is greater than 0 KB or not? if the file size is 0 KB then display error message to the users by using only PowerApps without Flow?

  • v-xiaochen-msft Profile Picture
    on at

    Hi @rkgoriparthi ,

     

    This is impossible. Just using powerapps can't meet your requirements.

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard