Uploaded file name

Does anyone know how to make the uploaded file name not show and instead use an icon?

I have modified the view / hide settings to add an icon if there is a file but I don’t want to see this huge file name everytime I upload something as it pushes the table cell to be huge.

If you’re comfortable with custom js, you can use something like this:

$(document).on('knack-records-render.view_xx', function (event, scene, records) {
    $("#view_xx").find("td.field_yy").each(function () {
        if ($(this).text().trim() !== "") {
            $(this).find("a").append("<i style=\"vertical-align: baseline !important;\" class=\"fa fa-file\"></i>&nbsp;");

I’ll give that a shot, thanks!

Hi Arjun, I’m trying to do the same thing but am not familiar with JS. Any chance you’d be up for talking it through with me? Thanks! Alice

Hey Alice. Sire thing… Just DM me and I can walk you through the process.

Hi @Alice - The below video may help explain how to use the excellent code that @Arjun supplied:

Hi Arjun, this is great code. I used it in a couple Table views, but I need to do the same in a Details view. Is there a version of this code that will work for Details views??

Correction: I need this code to work in a List view.