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 / power apps ———— If err...
Power Apps
Answered

power apps ———— If error in drop down

(0) ShareShare
ReportReport
Posted on by 54

Hi,

I try to get five drop-down list is "ok" at the same time, and the result of the text label is "ok". But if one of the drop-down list is "Fail", then the result of the text label is "Fail".

 

The program I wrote did not produce errors, but the results it produced were not what I wanted. I've set the following:

 

Drop down: Items=

["OK","Fail"]

 

Text Label: Text =

IfError((Text(Dropdown6.SelectedText.Value)&&(Dropdown7.SelectedText.Value)&&(Dropdown8.SelectedText.Value)&&(Dropdown9.SelectedText.Value)&&(Dropdown10.SelectedText.Value)),"OK", "Fail")

Screenshot 2023-05-05 060857.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks for your help!

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,720 Super User 2026 Season 1 on at

    Hi @Tan_Jia_Ying ,

     

    The IfError function is not for your use case. 

     

    Instead use the in operator and a table to get compact conditions for the If function:

     

    If(
    	"Fail" in [
    		Dropdown6.Selected.Value, 
    		Dropdown7.Selected.Value, 
    		Dropdown8.Selected.Value, 
    		Dropdown9.Selected.Value, 
    		Dropdown10.Selected.Value
    	],
    	"Fail", 
    	"OK"
    )

     

    I also replaced .SelectedText with .Selected since .SelectedText is deprecated. 

     

  • Tan_Jia_Ying Profile Picture
    54 on at

    This worked perfectly. Thank you.

  • Tan_Jia_Ying Profile Picture
    54 on at

    If I use Text Input instead of Dropdown, and the requirement is that the values ​​are not far apart, then Text Label will display the value between the large value and the small value.

    Screenshot 2023-05-05 101814.png

     

     

    For example: Text Input1 value is 2.57

                         Text Input 2 value is 2.51

                         Text Input 3 value is 2.53

     

                         Text Label will show 2.53

  • BCBuizer Profile Picture
    22,720 Super User 2026 Season 1 on at

    Hi @Tan_Jia_Ying ,

     

    Can you please open a new topic for this new question? Like that it is easier for members of the community to find answers solutions.

     

    Please feel free to tag me for a guaranteed response.

  • Tan_Jia_Ying Profile Picture
    54 on at

    Got it.

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard