# \[Feedback\] NEW Perspective Table

**URL:** <https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199>\
**Category:** Ignition Early Access\
**Created:** [December 3, 2018, 4:59pm UTC](https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199 "2018-12-03T16:59:35Z")\
**Posts on this page:** 1\
**Showing post:** 48

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [May 29, 2019, 11:57pm UTC](https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199/48 "2019-05-29T23:57:45Z")

</div>

For anyone wondering how they might be able to add custom row styles (and configuration) based upon a rows value derived from a dataset. You’ll need to create a transform on the bound dataset using a script like this example:

```auto
    output_json = []
    
    style_orange = {"backgroundColor": "#F7901D"}
    style_green = {"backgroundColor": "#00AA00"}
    
    for row in range(value.getRowCount()):
        row_object = {}
        
        row_value = {}
        row_style = {}
        for col in range(value.getColumnCount()):    
            row_value[value.getColumnName(col)] = value.getValueAt(row, col)
            row_object['value'] = row_value
            
            if value.getColumnName(col) == 'container_type':
                if value.getValueAt(row, col) == 'can':
                    row_style = style_orange
                elif value.getValueAt(row, col) == 'bottle':
                    row_style = style_green

            row_object['style'] = row_style
            
        output_json.append(row_object)
        
    return output_json

```

You can take it even further and create a shape as complicate as this if you’d like, for example:

```auto
    { 
        "value": { // The rows value. 
           "city": { // Custom cell configuration.
              "value": "Folsom",
              "editable": true,
              "style": {
                  "backgroundColor": "ignition-orange",
                  "classes": "some-class"
               },
              "align": "top" // Also accepts center and bottom
              "justify": "left" // Also accepts center and right
            },
            "country": "United States", 
            "population": 1000000 
        },
        "style": { // Custom row styles.
            "backgroundColor": "#F7901D",
            "classes": "some-class"
        }, 
        "subview": { // Row subview configuration. Can override configuration from rows config.
            "enabled": true, 
            "viewPath": "myView", 
            "viewParams": { 
                "param1": 3 
            } 
        } 
    } 

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199)._
