Adding attachments Json list formatting

74300515 21 Reputation points
2022-08-14T09:28:42.943+00:00

I have a SP list with attachments and use JSON formatting to customize the view of the list. I had no problem showing the other columns of the list, but when I want show attachments it seems not to react on anything. I cannot show the name of the attachment, the link to the document or a text when the row contains an attachment My code is here below.

  {  
    "elmType": "div",  
    "txtContent": "=if([$Attachments] == True,'BL','Geen BL' )",  
    "style": {  
      "text-align": "center",  
      "width": "100%",  
      "padding": "4px"  
    }  
  }
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,940 questions
{count} votes

Accepted answer
  1. Jing Sun_MSFT 956 Reputation points
    2022-08-18T03:17:09.967+00:00

    Hi @22093309,
    The Attachment column only indicates with an icon whether the items has attachments or not. Currently, it is not supported to format it by JSON formatting in SharePoint Online. I’m afraid there is no way to display the name of the attachment or customize the attachment column in a list.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.