Hi All,
Totally new to this so figuring things out as I go...
I have a text label called "Priority" that's populated with "High", "Medium" or "Low" text from a SharePoint list. (Not a dropdown, just a single line of text column)
Dependant on this value I'd like to change another labels fill to either red, orange or green.
This is not working:
If( text(Priority.Text) = "Low" , Color.Green, text(Priority.Text) = "Medium", Color.Orange, Color.Red )
Cheers in advance.
Solved! Go to Solution.
Hi @Doors1980
I assume the Priority is a variable in your data source and not a label name?
If You are trying to do this in a Gallery so something like this should fix your problems:
Fill =
Switch( ThisItem.Priority, "Low", Green, "Medium",Orange, Red )
@Doors1980 wrote:Hi All,
Totally new to this so figuring things out as I go...
I have a text label called "Priority" that's populated with "High", "Medium" or "Low" text from a SharePoint list. (Not a dropdown, just a single line of text column)
Dependant on this value I'd like to change another labels fill to either red, orange or green.
This is not working:
If( text(Priority.Text) = "Low" , Color.Green, text(Priority.Text) = "Medium", Color.Orange, Color.Red )
Cheers in advance.
You should not need to wrap the Priority.Text in another text, it should work by simply referencing Priority.Text and comparing that value to "Low" "Medium" etc.
I would also suggest using a switch statement as it's much easier to write. Something like:
Switch(Priority.Text,"Low",Green,"Medium",Orange,Red)
Read more on switch here:
https://powerapps.microsoft.com/en-us/tutorials/function-if/
Thanks @JRaasumaa but no joy.
Screenshot of error:
https://1drv.ms/i/s!AmrYzSj1K9FlgrhaCvoXWqQCnsNPcg
Hi @Doors1980
I assume the Priority is a variable in your data source and not a label name?
If You are trying to do this in a Gallery so something like this should fix your problems:
Fill =
Switch( ThisItem.Priority, "Low", Green, "Medium",Orange, Red )
Thank you both very much for your time, that worked @Anonymous
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
200 | |
99 | |
59 | |
58 | |
53 |
User | Count |
---|---|
257 | |
161 | |
88 | |
79 | |
69 |