How do I convert number column to a more human readable file size number?

I have a column in a table with a number type. The number represents file sizes in bytes. I am trying to display them in a more human readable way, with decimal rounding and kb, gb, etc. where appropriate. I figured out how to do basic arithmetic calculations, but nothing as complex as what I need. Any advice on how to achieve this?

@bobbintb you should be able to use a JSObject to create a function that reads the currentRow.columnName and add your logic there.

1 Like