Can you change the font color by dynamic data?

1635
5
08-20-2020 02:14 PM
ChristenWatts
New Contributor III

I am building out some cards, and using the Dynamic Text feature, is it possible to build an expression that would do an If, Else with the dynamic data?  I'd like to color code the data by the attribute.  So If Status is "green" then the font color would be green.  Is something like this possible?  Thanks for your help!

5 Replies
ShengdiZhang
Esri Regular Contributor

Hi Christen,

Currently there may not a better way to do this than manullay changing the font color, but we'll look into this.

Thank you,

Shengdi

CalebAnderson
New Contributor II

@ChristenWatts, did you find a solution for this. I have a very similar scenario, thanks! -Caleb

0 Kudos
ChristenWatts
New Contributor III

Hey @CalebAnderson  no, I didn’t figure it out. Let me know if you do!!

0 Kudos
CalebAnderson
New Contributor II

Thanks @ChristenWatts. It's not as elegant as being able to do this directly within a text box but one of our GIS developers, @PeterDalrymple,  pointed out that by referencing the web map within exp. builder, the 'feature info' widget passes in the pop-up from the web map. If a custom HTML pop-up is built using arcade expressions for changing color, this carries through into exp. builder. It's a different application concept than yours but I can share the link once complete if you're interested.

ChristenWatts
New Contributor III

Oh that’s really smart. I love arcade. Thanks for the great idea. 

0 Kudos