Protect JSON formatting in SharePoint lists when making the fields inline editable

Nicole Junk 25 Reputation points
2023-07-10T13:33:37.47+00:00

I am having issues when trying to use JSON to format my SharePoint lists.

I am able to apply graphical formatting but this formatting disappears when I try to also make the field inline editable.

I am thinking I am putting my inline edit JSON in the wrong space but am not sure. As you can see below, I have a circular graphic that disappears when I try to make the field editable.

Any help would be greatly appreciated!

User's image

User's image

Microsoft 365 and Office SharePoint For business Windows
{count} votes

Accepted answer
  1. Ling Zhou_MSFT 23,620 Reputation points Microsoft External Staff
    2023-07-12T02:15:27.92+00:00

    Hi @Nicole Junk,

    Thanks for the detailed description.

    There is nothing wrong with your whole JSON, your inline editable property should be in the front so that it's working for the whole column. Here is my modified JSON. I added "inlineEditField" in the third line.

    {
    	"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
       "elmType": "div",
       "inlineEditField": "@currentField",
       The next JSON stays the same as yours
    }
    

    Here is my test result:

    After the value is changed, the graphical formatting can be displayed normally.

    User's image

    User's image

    In addition, if the problem persists after you make the changes, try clearing your browser cache and checking 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.

    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.