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 / Conditional Formatting...
Power Apps
Answered

Conditional Formatting-Getting an Error

(0) ShareShare
ReportReport
Posted on by 15

I am working on a machine ordering App and I copy and pasted in a value, however it is giving me an error and an "invalid argument". Does anyone know of an alternate value I can use for a conditional formatting to highlight machines over $10,000. 

 

Here is the value: If(ThisItem.Price>10000,OrangeRed,Gray)

Machine Ordering .png
Categories:
I have the same question (0)
  • turnerj3 Profile Picture
    2,039 on at

    Your color values aren’t being accepted, try using quotes around the colors or another syntax

  • turnerj3 Profile Picture
    2,039 on at
    Color.GrayColorValue( "#808080" )
    ColorValue( "Gray" )
    Color.OrangeRedColorValue( "#ff4500" )
    ColorValue( "ORANGERED" )
  • TheRobRush Profile Picture
    11,128 Moderator on at

    yah, I would double check the colors like turner suggested, easiest way is just delete until you are at the If(statement, and then start typing the first color then select form the choices it suggests, then add comma start typing second color and again click on one of its suggestions.

    sometimes if you just copy and paste from elsewhere the prog doesnt recognize it as a color

  • Sherri Profile Picture
    15 on at

    Thank you @turnerj3 & @TheRobRush I have tried all suggested variations. Unfortunately, I am still getting errors. Not sure why the color is not being recognized. Thanks for your help.

  • turnerj3 Profile Picture
    2,039 on at

    Keep showing the errors, we can figure 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    TheRobRush_0-1684544370064.png

    works fine for me, maybe save close and reboot

     

  • turnerj3 Profile Picture
    2,039 on at

    If(ThisItem.Price>10000,Color.OrangeRed,Color.Gray)

  • Verified answer
    Sherri Profile Picture
    15 on at

    Hi,

    I actually changed the value to: If(ThisItem.Price>10000,Color.Red) and it cleared the error. Thanks

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard