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 / submit form when attac...
Power Apps
Answered

submit form when attachment is attached based on choice field

(0) ShareShare
ReportReport
Posted on by 215

Hi 
I have Choice field DataCardValue1 values are "Yes" and "No", and i have attachment datacard name DataCardValue2 

if  DataCardValue1 selected "Yes"  that time DataCardValue2 (attachment) at least one file attached than only have to submit  

if  DataCardValue1 selected "No" than no need to attach anything 

please give me codes for this 
Thank you 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @ursNani 

    Consider the following Formula:

    If(
     (DataCardValue1.Selected.Value = "Yes" && CountRows(DataCardValue2.Attachments)>0) ||
     DataCardValue1.Selected.Value = "No"
     ), 
     SubmitForm(yourForm)
     
    )

     

    I hope this is helpful for you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard