Hello everyone,
I'm writing to you because I'm stuck on a manipulation that I think is actually simple to perform.
I created a list on sharepoint that I put on powerapps as Forms. In this list is a drop-down menu in which I have the values "TB", "B", "M", "I", "TI" (which means very good, good, average, insufficient, really insufficient, in French).
My goal is to display these values with different colors in the dropdown menu ("TB" in green for example and "TI" in red).
I already managed to display the final value with its color in SelectedTagFill with this code (you can find the result in attachment Screenshot 1):
If(
DataCardValue25.Selected.Value = "TB", Color.MediumSeaGreen,
DataCardValue25.Selected.Value = "B", Color.DarkTurquoise,
DataCardValue25.Selected.Value = "M", Color.Gray,
DataCardValue25.Selected.Value = "I", Color.Gold,
DataCardValue25.Selected.Value = "TI", Color.Tomato
)
The color is also correct in the SelectionFill (screenshot 2).
But all the boxes are white and I can't assign the right color to them, I would like each choice to have a different color when I unroll the menu.
I have the same problem with my HoverFill (I put the same code than for my SelectedTagFill) which when I move my mouse over the values has the color of the selected value and not a different color each time (Screenshot 3).
I tried with "DataCardValue25.Value" instead of "DataCardValue25.Selected.Value" but I have an error.
Please to you have a tips for me ?
(I tried to make
If(
DataCardValue25.Selected.Value = "TB", Color.MediumSeaGreen,If(
DataCardValue25.Selected.Value = "B", Color.DarkTurquoise, If(
DataCardValue25.Selected.Value = "M", Color.Gray, If(
DataCardValue25.Selected.Value = "I", Color.Gold, If(
DataCardValue25.Selected.Value = "TI", Color.Tomato
)))))
But I have the same result).