How can we check if the record has an attachment in list view

divya_dattatray
Kilo Contributor

How can we check if the record has an attachment in list view. As now we have to open every record to see if the record has an attachment.

so want to know if record has an attachment from list view itself, how we can achieve this.

1 ACCEPTED SOLUTION

ChrisBurks
Mega Sage

Another way that is possible is using the hasAttachments() on the sys_ui_style table for the record. For instance if I wanted an icon or color change to indicate that the record has an attachment in the list view I could setup a style like so:


sys-ui-style.png



And if the record has an attachment it will display like below (I didn't have a paperclip icon 😞



attachment-list-view.png


(Notice the little yellow document icon)



I know, aesthetically it's not all that pretty. But it's an option. Perhaps maybe if the field were just an empty field and then this style placed on that field it may look better.


View solution in original post

30 REPLIES 30

That image is already in the instance, under System Ui > Images



system_ui_images.PNG


Any suggestions on how to have the icon appear to the right of the number so it doesn't throw off the alignment?



Thanks,


David


If you're using the styles technique I mentioned in this post try adding "direction: rtl" as one of the styling. You might also have to remove "background-position" styling and replace with "background-size: contain"


My icon isn't displaying right, any ideas what i could have done wrong?

find_real_file.png

find_real_file.png

its loaded properly but isn't displaying right.

Try adding this extra style property and value:

background-size: contain;