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 / If Logic in Form Submi...
Power Apps
Answered

If Logic in Form Submission

(0) ShareShare
ReportReport
Posted on by 224

Can someone help me with the If statement for a Visible part of an Icon?

 

Below is what I had, but then realize it wasn't completely correct.

 

Basically it's was a form with Officer (combobox), Service (combobox), Amount (text input) and Attachments as required fields and the visible portion was if the form was valid.

 

Now I need to add a checkbox for missing receipt so the form should require the Officer, Service, Amount, and Attachment OR Missing Receipt checked off before the submit button is Visible.

 

The below code is what I had, but I didn't realize you could just check off the Missing Receipt and the submit button would appear, so I have faulty code.

 

Which part do I need to fix?

 

 

If(!IsBlank(DataCardValue1)&&!IsBlank(DataCardValue4)&&!IsBlank(DataCardValue3)&&(!IsEmpty(DataCardValue7.Attachments)||DataCardValue5.Value),true,false)

 

 

as733y_0-1710518900223.png

 

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @as733y -

     

    As I understand it, the Office, Service, Amount and Attachments DataCards are required. However, if the "Missing Reciept" checkbox is checked, then the Attachments field is not required.

     

    On the Required property of the Attachments DataCard, enter:

     

    !'Your CheckBox Name'.Value

     

    On the Visible property of the Button, enter:

     

    'Your Form'.Valid

     

  • Verified answer
    as733y Profile Picture
    224 on at

    Thank you for your reply @Amik 

     

    I went to sleep and ended up with the below which I believe is working.

     

    If(Form.Valid&&Or(!IsEmpty(DataCardValue7.Attachments)||DataCardValue5.Value),true,false)

     

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 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard