Popup template - conditional field formatting JS 4.14

461
2
Jump to solution
01-13-2020 12:30 PM
KarstenRank2
New Contributor

Hi,

I found this question Popup template - conditional title formatting JS 4.14 here in the Community.

Is it also possible to change the color of the field section of the popup template?

{
 type: "fields",
   fieldInfos: [{
   fieldName: "count",
   label: "name",
   format: {
    digitSeparator: true,
    places: 0
   }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

The text of the fieldName "count" should get red if it is < 0 or green if > 0.

Thanks for your help!

Karsten 

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

This sample should show how it can be done. 

-Undral

View solution in original post

2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

This sample should show how it can be done. 

-Undral

KarstenRank2
New Contributor

Thank you Undral!

To create a table should not be a problem after your hint.

Karsten

0 Kudos