web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / working with dataverse...
Power Apps
Answered

working with dataverse cards

(0) ShareShare
ReportReport
Posted on by 259

Hi all,

I have a datacard and wanted to play with color of Datacardkey in my case it is (building#)

Rabbanisyed_0-1634220296763.png

in color property of Datacardkey my formula is below which throws error 

Switch(DataCardValue7.selected.value,"200",orange,"202",Green,"205",red)

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,995 Most Valuable Professional on at

    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)

     

    thisitembuildingnumber.png

     

  • Rabbanisyed Profile Picture
    259 on at

    @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)

    Rabbanisyed_0-1634281033512.png

    Appreciated for you demo👍👍👍👍👍 

  • Expiscornovus Profile Picture
    33,995 Most Valuable Professional on at

    Hi @Rabbanisyed,

     

    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)

     

    selectiontagcolor.png

  • Rabbanisyed Profile Picture
    259 on at

    @Expiscornovus still getting  error

    i used the SelectionTagColor Property as said , what if i use the COLOR Property

    Rabbanisyed_1-1634283428961.png

     

    Rabbanisyed_0-1634283348665.png

     

  • Rabbanisyed Profile Picture
    259 on at

    I am using Dataverse Table with Choices control not the dropdown and dropdown control is not in the DV

  • Verified answer
    Expiscornovus Profile Picture
    33,995 Most Valuable Professional on at

    Hi @Rabbanisyed,

     

    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)

     

  • Rabbanisyed Profile Picture
    259 on at

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard