Removing file attachment filename (only using icons?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mudokai
    Junior Member
    • Nov 2025
    • 11

    #1

    Removing file attachment filename (only using icons?)

    Hi - it appears that using the full filename in list_view is triggering text wrapping and double line usage that I'd like to fix; is there a way you can use code to remove the filename from the list view only, and just use an icon for each file that's attached for that column? Would use tooltip hover for the filename to show up on list if needed. Thanks
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1787

    #2
    From where do you pull the attachments? Is it from documents or a custom entity?

    Comment

    • mudokai
      Junior Member
      • Nov 2025
      • 11

      #3
      Originally posted by shalmaxb
      From where do you pull the attachments? Is it from documents or a custom entity?
      A custom entity as I have a File Attachment field that I created for each. Would be interested to know if it can be done either way, though. Thanks

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1787

        #4
        I did something like that.
        Besides the file type field, set an enum field with the name "filetype"with some options (e.g. image, doc, pdf etc.).
        Set a custom image field with the name "icon".
        I saved the icons in documents and built a relationship between my custom entity and documents, so that I could use the icons saved in documents.
        Create a formula, which depending on the options of the enum fields, gets the correct icon by id from the documents. It would look like this, more or less:

        PHP Code:
        ifThen(
        filetype == 'PDF'//the option of the enum
        icon '12345678' //id of the respective icon
        ); 
        You could even create another formula, to set the filetype option by the file extension, so that on upload the option is set automatically and after that the icon is set automatically. If you need help with that formula, ask. With that formula you could even hide the enum field.

        In the list view now you can insert the column icon.

        If you need I can provide you with icon sets for filetypes.

        Comment

        • mudokai
          Junior Member
          • Nov 2025
          • 11

          #5
          Please do provide the icon sets so I can see if possible. Would be great. I'm trying to add custom icons to the rows myself to show # Calls, etc. but that's a separate topic

          Comment

          • shalmaxb
            Senior Member
            • Mar 2015
            • 1787

            #6
            Icons filetypes
            Attached Files

            Comment

            • mudokai
              Junior Member
              • Nov 2025
              • 11

              #7
              All help is appreciated - I could try to figure this out, but any guidance on simply work flow to swap what I'm currently showing - which is, I have a custom field on my Accounts page associated with file_attachment - this is shown in list which obviously pulls the full filename when uploaded. I'd like to just show the icon x quantity of however many files are uploaded in that space - if I have 2/3 PDFs, instead of showing full filename, I just want the icons to show so the user can click into the icon and it opens the file rather than as they do now which is the filename. Any guidance on that?

              Comment

              • mudokai
                Junior Member
                • Nov 2025
                • 11

                #8
                You suggest the icon solution although I think it doesn't solve the request - my request was tied to having to be able to click the icon to show the file attachment, I just want to remove the whole filename from my list view - it distorts our columns when the filename is too long, hence the request for the icon. Any solution you could recommend?

                Comment

                Working...