Json formatting not working after SP List update

JooPauloSantos-7617 0 Reputation points
2024-03-07T16:56:05.9633333+00:00

Hey guys, after a recent update to sharepoint lists my json formatting code stopped working as expected, cant figure out why.

Please notice the images bellow to see the diference.

Before:

img6

After:img5

Here is the code

{

"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",

"groupProps": {

"headerFormatter": {

"elmType": "div",

"style": {

"flex-direction": "row"

},

"children": [

{

"elmType": "div",

"style": {

"padding": "4px 8px 5px 8px",

"border-radius": "6px",

"font-weight": "500"

},

"attributes": {

"class": {

"operator": "+",

"operands": [

"ms-bgColor-themePrimary ",

"ms-fontColor-white"

]

}

},

"children": [

{

"elmType": "span",

"style": {

"padding-right": "6px",

"padding-top": "2px"

}

},

{

"elmType": "div",

"style": {

"display": "inline-flex",

"padding-right": "9px"

},

"children": [

{

"elmType": "div",

"style": {

"padding-left": "5px"

},

"attributes": {

"class": "ms-fontWeight-normal"

},

"txtContent": "@group.fieldData"

}

]

}

]

}

]

}

}

}

Appreciate all the help

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,141 questions
{count} votes

8 answers

Sort by: Most helpful
  1. Emily Du-MSFT 43,431 Reputation points Microsoft Vendor
    2024-03-08T08:53:10.78+00:00

    I have tested the JSON code, it works well in my SharePoint.

    User's image

    The update is a new experience released by Microsoft for List. Microsoft made views easier to create and access by arranging them into tabs at the top of the screen. users can use custom views that slice, dice, and arrange the right information for specific audiences or scenarios. This new update will not affect the JSON codes for the view.

    I notice that two screenshots show different views in the document library.

    Please go to the Products view, format the current view, use JSON code.


    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. Weyn Katrien 0 Reputation points
    2024-06-17T09:31:34.3566667+00:00

    Hello, did you find a solution for this? The new list experience also messed up all my JSON formatted double groupings.

    0 comments No comments

  3. LVS 0 Reputation points
    2024-06-19T15:12:10.9266667+00:00

    Do we have update on this issue? our JSON format also stop working after the SharePoint list update

    0 comments No comments

  4. JDL 0 Reputation points
    2024-06-20T12:17:12.0233333+00:00

    Hi everybody,

    I think I face the exact same issue. Since this morning the Microsoft List object in our Teams has changed with the views presented in Tab and not in a Menu and now my formatting JSON has strange behavior.

    After some investigation it seems the groupProps with headerFormatter have a major issue.
    In my view, the group row is now covering the 6 following rows in the view preventing to read te content :(.

    The dev team in MS forgot to do the non-regression tests before deliver !!!!

    JD

    0 comments No comments

  5. Trishia Rodriguez 0 Reputation points
    2024-06-20T12:55:24.51+00:00

    Our JSON formatting was also affected this morning. We have a column formatting showing a hyperlink to another list with dynamic verbiage based on the Approval Status field.

    The hyperlink still works but the verbiage is always resolving to Rejected. Causing a lot of panic with users thinking everything is getting rejected.

    Protion of JSON not working.

    "txtContent": "=if([$_ModerationStatus]==0,'Approved',if([$_ModerationStatus]==2,'In Progress','Rejected'))"

    0 comments No comments