Select to view content in your preferred language

Formatting cell values of a table added with table widget to dashboard

668
3
Jump to solution
02-28-2024 09:38 AM
Labels (1)
ellipsol
Regular Contributor

I added a table widget and connected it with a table in a dashboard. I want to format select cell values. I'm think I could manage this with Arcade, similar to what's below. Is there a way to handle this table formatting in a dashboard?

var bld = Concatenate('<strong>'+$feature.LT2_Difference+'</strong>')


# Format where values are less than or equal to -1
var val = When($feature.LT2_Difference <= -1, bld, $feature.LT2_Difference);

return{
LT2_Difference: {
      displayText : val,
      textColor: '',
      backgroundColor: '#e0e0e0',
      textAlign: 'left',
      iconName: '',
      iconAlign: '',
      iconColor: '',
      iconOutlineColor: ''
    }
}

 

Tags (2)
2 Solutions

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

You can find the Advanced Formatting for tables under the Values tab. Each column will have its own section of the return statement.

JenniferAcunto_0-1709150250028.png

 

- Jen

View solution in original post

ellipsol
Regular Contributor

Thank you, I misspoke and realize I was trying in Experience Builder, not a Dashboard. I got a minimum working example with your response, in a Dashboard.

var bgcolor = When($datapoint.diffVal <= -1, '#CC0000', '')
var tcolor = When($datapoint.diffVal <= -1, '#111', '') 

return

return {
  cells: {
    LT2_Difference: {
      displayText : $datapoint.diffVal,
      textColor: tcolor,
      backgroundColor: bgcolor,
      textAlign: 'right',
      iconName: '',
      iconAlign: '',
      iconColor: '',
      iconOutlineColor: ''
    },
}
}

 

View solution in original post

0 Kudos
3 Replies
JenniferAcunto
Esri Regular Contributor

You can find the Advanced Formatting for tables under the Values tab. Each column will have its own section of the return statement.

JenniferAcunto_0-1709150250028.png

 

- Jen
ellipsol
Regular Contributor

Thank you, I misspoke and realize I was trying in Experience Builder, not a Dashboard. I got a minimum working example with your response, in a Dashboard.

var bgcolor = When($datapoint.diffVal <= -1, '#CC0000', '')
var tcolor = When($datapoint.diffVal <= -1, '#111', '') 

return

return {
  cells: {
    LT2_Difference: {
      displayText : $datapoint.diffVal,
      textColor: tcolor,
      backgroundColor: bgcolor,
      textAlign: 'right',
      iconName: '',
      iconAlign: '',
      iconColor: '',
      iconOutlineColor: ''
    },
}
}

 

0 Kudos
EllieLinden
Occasional Contributor

Is there a plan to allow for value formatting options (e.g. Setting Digit grouping, Maximum decimal places, etc.) directly to the ArcGIS Dashboard table widget to avoid the need to use Arcade within Advanced Formatting?

0 Kudos