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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Multiple IF statement

(0) ShareShare
ReportReport
Posted on by 504

I have a dropdown list (DataCardValue16) Where if I choose "Other" a textbox will appear. If(DataCardValue16.Selected.Value="Other",true,false).

 

I am trying to make validation that the textbox is required, if user chose "Other" and did not input anything on the textbox the button will be DisplayMode.Disabled.

If(DataCardValue16.Selected.Value="Other" && DataCardValue18.Text="",DisplayMode.Disabled,DisplayMode.Edit)
The Code above  works

but I have another Set of dropdown, how to do it?

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,921 on at
    Re: Multiple IF statement

    Try on the displaymode of the button:

    If(DataCardValue16.Selected.Value="Other", DisplayMode.Edit, DisplayMode.Disabled)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

     

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Multiple IF statement

    @nagestiada 

    Just repeat the validation as a 2nd set of criteria in the FILTER.

    If(
     DataCardValue16.Selected.Value="Other" && DataCardValue18.Text="",
     DataCardValue17.Selected.Value="Other" && DataCardValue19.Text=""
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • nagestiada Profile Picture
    504 on at
    Re: Multiple IF statement

    If(DataCardValue16.Selected.Value="Other" && DataCardValue18.Text="" || DataCardValue21.Selected.Value="Other" && DataCardValue19.Text="" ,DisplayMode.Disabled,DisplayMode.Edit)

    Im trying this set of code but second statement does not work

  • nagestiada Profile Picture
    504 on at
    Re: Multiple IF statement

    If(DataCardValue16.Selected.Value="Other" && DataCardValue18.Text="", DataCardValue21.Selected.Value="Yes" && DataCardValue19.Text="" ,DisplayMode.Disabled,DisplayMode.Edit)

     

    I'm getting invalid if statement error

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Multiple IF statement

    @nagestiada 
    Can you please send a screenshot and supply the error message?

  • Verified answer
    mdevaney Profile Picture
    29,987 Moderator on at
    Re: Multiple IF statement

    @nagestiada 
    I made an error.  It should be this instead.

     

    If(
     DataCardValue16.Selected.Value="Other" && DataCardValue18.Text=""
     || DataCardValue17.Selected.Value="Other" && DataCardValue19.Text=""
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

     

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • nagestiada Profile Picture
    504 on at
    Re: Multiple IF statement

    this worked but should use || (or) instead of && (and). Thank you!

  • mdevaney Profile Picture
    29,987 Moderator on at
    Re: Multiple IF statement

    @nagestiada 

    Changed it now.  Best of luck building your app!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 766 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 235

Last 30 days Overall leaderboard