cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Application
Use this script in a pivot table where a column may have all NULL values to clean up the UI.
The irrelevant columns are dropped after being loaded
widget.on('ready', function(){
   var tlen = parseInt($('.p-container thead tr td').last().prev().attr('fidx')) + 2 //counts how many cols total
   var dims = $('#pivot_ td.p-dim-head').length // counts the number of dims
   for (var i = dims; i < tlen; i++) {
      var stuff = $('#pivot_ td.p-value[fidx='+i+']:not(.p-total-row-val)').text().trim()
   //if the text content is empty then hide the column
   if(stuff ==''){
         //$('td[fidx="' + i +'"]').css('display', 'none'); //hides column
   $('td[fidx="' + i +'"]').remove(); //hides column
      }
   };
});
Rate this article:
Version history
Last update:
‎03-02-2023 09:13 AM
Updated by:
Contributors