Sharepoint list layout issue with JSON formatting

Ambika 20 Reputation points
2023-08-21T08:14:29.2166667+00:00

Dear Members, pls help me out - I have added JSON formatting to my sharepoint list and I need my list item header to look like the code I added below. The problem is that it is getting displayed as "Request No." (blank) and not reflecting the title column value (which, I must add, is automated on PowerAutomate to reflect the ID column). Earlier this same code was working but now it is not. What i the reason and the solution? Please please please help. (The internal name for the Title column is Title only)

User's image

{
    "elmType": "div",
    "attributes": {
        "class": "ms-bgColor-blueDark"
    },
    "style": {
        "width": "90%",
        "border-top-width": "0px",
        "border-bottom-width": "1px",
        "border-left-width": "0px",
        "border-right-width": "0px",
        "border-style": "solid",
        "margin-bottom": "16px"
    },
    "children": [
        {
            "elmType": "div",
            "style": {
                "display": "flex",
                "box-sizing": "border-box",
                "align-items": "center"
            },
            "children": [
                {
                    "elmType": "div",
                    "attributes": {
                        "iconName": "Pin",
                        "class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-white",
                        "title": "Details"
                    },
                    "style": {
                        "flex": "none",
                        "padding": "0px",
                        "padding-left": "0px",
                        "height": "36px"
                    }
                }
            ]
        },
        {
            "elmType": "div",
            "attributes": {
                "class": "ms-fontColor-white ms-fontWeight-bold ms-fontSize-24"
            },
            "style": {
                "box-sizing": "border-box",
                "width": "100%",
                "text-align": "left",
                "padding": "21px 12px",
                "overflow": "hidden"
            },
            "children": [
                {
                    "elmType": "div",
                    "txtContent": "='Request No. ' + [$Title]"
                }
            ]
        }
    ]
}
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,230 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Emily Du-MSFT 51,781 Reputation points Microsoft External Staff
    2023-08-22T09:32:27.7+00:00

    I have tested the situation and I cannot reproduce the issue.

    Here are my steps.

    1.Create a flow to fill in Title column as ID column.

    1

    2.Add JSON codes to header.

    User's image

    3.Result:

    User's image

    Could you provide your Power Automate? And you could try to delete the JSON codes then re-add again.


    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.


  2. Ganesh Sanap 211 Reputation points
    2023-08-25T08:14:32.49+00:00

    @Ambika did you hide the Title column from list form?

    If yes, in that case the showing Title column value using JSON will not work as JSON formatting can only read the column values for fields which are visible on the list forms.

    1. Make sure you have not hide the Title column from list form
    2. Make sure you are using correct internal name of your SharePoint list columns in the JSON

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have extra questions about this answer, please click "Comment". For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

    0 comments No comments

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.