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 / What`s wrong with this...
Power Apps
Unanswered

What`s wrong with this code?

(0) ShareShare
ReportReport
Posted on by 520
If(_currentPhase = "Green Light" Or _currentPhase = "Go Live",
 
 If(dcvSupplierQualifcationRequired.Selected.Value = true, 
If(dcvSupplierQualifcationCompleted.Value = true And dcvAEDiscalimers.Value = true And dcvPVTrainingOfSupplier.Value = true, HiColors.Green_hard, Orange),
If(dcvAEDiscalimers.Value = true And dcvPVTrainingOfSupplier.Value = true, HiColors.Green_hard, Orange)
),
 
 If(_currentPhase = "First Idea" , HiColors.Grey_forsmallProgressBar))
Categories:
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Robert94 ,

     

    I would say: don't compare a boolean property to a boolean value to obtain a boolean result. A boolean is a boolean, and you don't need and shouldn't try to verify if "property = true". 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Robert94 

    What problem are you having with it?  In general, you are not specifying a final "else" to your formula should none of the conditions be met.

     

    You can change your formula to the following:

    If(
     (
     (_currentPhase in "Green Light|Go Live") &&
     (dcvSupplierQualifcationRequired.Selected.Value && dcvSupplierQualifcationCompleted.Value && dcvAEDiscalimers.Value && dcvPVTrainingOfSupplier.Value)
     ) ||
     (dcvAEDiscalimers.Value && dcvPVTrainingOfSupplier.Value), 
     HiColors.Green_hard, 
     _currentPhase = "First Idea" , 
     HiColors.Grey_forsmallProgressBar,
     Orange
    )

     

    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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard