Hide Pop Column based on setting service

We are looking to disable/hide a table pop up column based on a value in a setting service. So when the value of one of the setting service is “Live” we want to show the column, when it is anything else we want to hide it. Is that possible?

image

Hi @rdclapp ,

To achieve this, you will need to do a few steps, there may be an easier or better way… but this would do the trick! It will not hide the column, but hide the pop-up icon, so it is not clickable.

1.Create a custom column in the grid, and do a DBRW to the }ElementAttributes cube of the dim you want to do the check, use for example the description attr, you can hide this extra column later on…

This is the only way to use the control settings on the Grid, can’t do directly.
But now, you have a way to do a conditional formatting on the Column based on it.

2.on the custom-style.css, create a custom CSS class with the settings to make the icon blank, in this case, should be something like this, i called column-blank:

.handsontable td.column-blank > a.reference-modal-icon {
    pointer-events: none !important;
    background: none !important;
    background-color: #fff !important;
}

3.create a conditional column format on the pop-up column, on your case, the “Details” one.
In my example, the column is called “Overview” and I am only showing if the Region is USA, otherwise hide it. for your case would be the “Live” business event dim.

    "columnFormat": {
      "Overview": [
        {
          "dataColumn": "Check",
          "condition": "!=",
          "value": "USA",
          "className": "column-blank"
        }
      ]
    }

this is how it looks:

Hope this helps!