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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Attachment validation ...
Power Apps
Answered

Attachment validation based on checkbox

(0) ShareShare
ReportReport
Posted on by 537

I need to perform attachment validation based on checkbox selection field. If checkbox is selected, user should mandatorily upload attachments whereas if checkbox not selected, user not required to upload attachments.

 

If user clicks on Preview button and if checkbox is checked without any attachments uploaded, it should not allow me to go back to preview screen. Should throw error message.

 

If checkbox not checked and attachment is uploaded or not uploaded, I should be able to preview the form, Any idea how to achieve this?

 

 

 

Iantaylor2050_0-1680586617960.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Iantaylor2050 ,

     

    Please try below formula OnSelect of the preview button:

    If(!Checkbox.Value, Navigate(PreviewScreen), If(CountRows(AttachmentDataCardValue.Attachments)=0, Notify("Error:at least one file needed"), Navigate(PreviewScreen)))

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard