Is is possible to Hide a column in the MRVS table is no row in that column has a value?

JM316
Mega Sage

On the RITM or Catalog Task where this MRVS would appear, is there a catalog script or ui policy that would Hide a column if the column has no value in any row? 

In this example, there is one row in the table and there is no value for "VM T-Shirt Size", could I remove or hide the column "VM T-Shirt Size" because it has no value and no need to use up the space in the table.

find_real_file.png

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

You can create a on load client script to hide this column if no value is present.

 

g_form.setDisplay('your_variable_name',false);

 

Regards,

Sachin

That sets a variable as hidden with or without any value. it won't hide the column.

I need to hide the column but only when value is null.

You need to add condition to verify if variable value is null like below

 

if(g_form.getValue('your_variable') == ''

g_form.setDisplay('your_variable_name',false);

 

Regards,

Sachin

Yes, that is correct. That is how you hide and unhide a variable conditionally. 

That won't make a column in the MRVS hidden.

I'm looking for a way to have the column in the MRVS hidden if no row has any value.

I can hide and unhide variables today that are on an MRVS but I cannot find a way to hide the column of the MRVS table you would see on the RITM or Catalog Task.