cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PAB
Level: Powered On

If Statement for Fill Color in Circles

Hi,

 

I never got these errors before yesterday and now I am trying to fix the errors by changing all the colors to Color.Yellow etc. The original statement had the same If statement for both but except the color was just by itself like this:

If(Subtitle1_1.Text="Light Green",LightGreen,Subtitle1_1.Text="Yellow",Yellow,Subtitle1_1.Text="Green", Green, Subtitle1_1.Text="Gray",Gray,Subtitle1_1.Text="Red",Red,Black)

 

There is nothing different between the two statements besides the fact that they are on a different screen. They are both if statements to fill a color based on the value of a field. Let me know if you can figure out what is causing the issue because I do not see the difference.

Error:

colorerror.PNG

No Error:

ColorNoError.PNG

4 REPLIES 4
Meneghino
Level 10

Re: If Statement for Fill Color in Circles

hi @PAB, what is the text of the error message?

PAB
Level: Powered On

Re: If Statement for Fill Color in Circles

Error Message:

The function "If" has some Invalid arguments

Invalid use of '.'

error message.png

Meneghino
Level 10

Re: If Statement for Fill Color in Circles

I am stumped, but try with just one branch of the if and different variants, with or without the Color. and also RGBA.

PAB
Level: Powered On

Re: If Statement for Fill Color in Circles

One if statement does not work either with the Color.Yellow however it does work with the RGBA but if the rest of my app is coded with Color.Yellow I don't understand why it will not work in this case. It seems a little buggy to me that when they pushed out this update it started throwing an error on every single screen that I had done like this even though it was working before and now the same statement on different screens won't work.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,170)