I'm doubting if this is possible in PowerApps. I have a simple lookup fields with a few value.
When some select "Sales", i want to change to color of the text or combo box to red, etc.
If(ThisItem.RecordType.Value = "Verkoop", Orange, ThisItem.RecordType.Value = "Risk", Red, ThisItem.RecordType.Value = "Dependency", Blue, Black)
I changed the color of the RecordType datacard but nothing happends. So, is it correct you can't change the color of a combo box with a sertain value?
Solved! Go to Solution.
I would suggest changing the properties of the ComboBox itself instead of the DataCard. Not all properties of the ComboBox are linked to the Parent DataCard by default. Some suggested properties to change are Fill (background color), Color (text color) and Border (border Color).
Also, you might need to use the IN operator rather than the equals sign in your conditional statement.
If( "Verkoop" in ThisItem.RecordType.Value, Orange, "Risk" in ThisItem.RecordType.Value, Red, "Dependency" in ThisItem.RecordType.Value, Blue, Black )
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."
If( ThisItem.Bedrijfsunit.Value = "Verkoop", Orange, ThisItem.Bedrijfsunit.Value = "Eigendom", Red, ThisItem.Bedrijfsunit.Value = "Inkoop", Blue, Black )
When i use this, the combox is and stays black, so it looks the code is only working for the black color.
Very strange because the values are correct.
Do you have any other options than .Value when the autocomplete appears?
You might also want to test by putting ThisItem.Bedrijfsunit.Value in the Text property of a label to see what it returns. The label must be in the same DataCard as the ComboBox
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.