List view column hide

Hi i want to hide column displaying in list view based on role is there any possibility through code.

There are a couple of things you could do.
Is the role in general not allowed to see the field? Then you can work with permissions. If The role doesn’t have permissions to see the column, it will not be displayed.

I am currently working on a way to hide arbitrary columns through code. I cannot find anything in the docs / forums and am currently going through the frappe code to find a solution.

My hacky JS way so far is to

  1. Find the Column index by looking for the header
  2. Find all columns in the row by the index
  3. Use JQuery to hide header column and row columns

Tinker around with the onload function in the _list.js, you might be able to do something similar for your situation

@vignesh_b1 & @tomf