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
Removing file attachment filename (only using icons?)
Collapse
X
-
Comment
-
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:
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.PHP Code:ifThen(
filetype == 'PDF', //the option of the enum
icon = '12345678' //id of the respective icon
);
In the list view now you can insert the column icon.
If you need I can provide you with icon sets for filetypes.
Comment
-
-
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
-
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

Comment