Announcements
Hi all,
I have a datacard and wanted to play with color of Datacardkey in my case it is (building#)
in color property of Datacardkey my formula is below which throws error
Switch(DataCardValue7.selected.value,"200",orange,"202",Green,"205",red)
Hi @Rabbanisyed,
Is your Build number field of data type single line of text or a number?
When it is a number can you try something like below:
Switch(ThisItem.'Building Number', 200, Color.Orange, 202, Color.Green, 205, Color.Red, Color.Black)
@Expiscornovus Thanks it works, i have a choice column and wanted to to change the color based on the priority
when selected low,medium,high i want the color to be different based on given formula i tried but no success
Switch(DataCardValue7.Selected.Value,"Low",Color.Orange, "Medium", Color.Green,"High",color.Red)
Appreciated for you demo👍👍👍👍👍
If you only want to style the text of the selected value you could use the SelectionTagColor property. You could use this formula in there:
Switch(DataCardValue4.Selected.Value, "Low", Color.Orange, "Medium", Color.Green, "High", Color.Red, Color.Black)
@Expiscornovus still getting error
i used the SelectionTagColor Property as said , what if i use the COLOR Property
I am using Dataverse Table with Choices control not the dropdown and dropdown control is not in the DV
The value is probably a different data type.
Can you try converting it into text and see if it works in the SelectionTagColor?:
Switch(Text(DataCardValue7.Selected.Value), "Low", Orange, "Medium", Green, "High", Red, Black)
Great i use the color Property and got Thanks for the Help
⭐⭐⭐⭐⭐
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 416 Most Valuable Professional
11manish 205 Super User 2026 Season 2
MS.Ragavendar 128 Super User 2026 Season 2