SOLVED

Json Formatting Column Code

%3CLINGO-SUB%20id%3D%22lingo-sub-2154366%22%20slang%3D%22en-US%22%3EJson%20Formatting%20Column%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154366%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wanted%20to%20use%20Json%20code%20to%20format%20a%20number%20column%20as%20a%20data%20bar.%20I%20found%20the%20resource%20to%20do%20this%20but%20before%20I%20can%20attempt%20this%20I%20need%20to%20learn%20how%20to%20use%20Json%20code%20to%20count%20the%20%23%20of%20days%20since%20the%20Document%20was%20uploaded%20(%20Created%20Column)%20to%20when%20the%20(Status)%20field%20is%20set%20to%20'Resolved'.%20I%20need%20it%20to%20display%20in%20days.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20help%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2154366%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2154940%22%20slang%3D%22en-US%22%3ERe%3A%20Json%20Formatting%20Column%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154940%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F891171%22%20target%3D%22_blank%22%3E%40batvan276%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20cannot%20track%20the%20changes%20to%20Status%20column%20%26amp%3B%20it's%20value%20using%20JSON%20code.%20Using%20JSON%20you%20can%20only%26nbsp%3B%3CSPAN%3Ecustomize%20how%20fields%20in%20SharePoint%20lists%20and%20libraries%20are%20displayed.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20might%20want%20to%20populate%20the%20no.%20of%20days%20column%20based%20on%20status%20change%20using%20Power%20Automate%20flow%20and%20then%20you%20can%20apply%20formatting%20using%20JSON%3A%3C%2FP%3E%3CP%3E%3CA%20title%3D%22Format%20a%20number%20column%20as%20a%20data%20bar%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%23format-a-number-column-as-a-data-bar-advanced%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EFormat%20a%20number%20column%20as%20a%20data%20bar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello, 

 

I wanted to use Json code to format a number column as a data bar. I found the resource to do this but before I can attempt this I need to learn how to use Json code to count the # of days since the Document was uploaded ( Created Column) to when the (Status) field is set to 'Resolved'. I need it to display in days. 

 

Can anyone help?

 

1 Reply
Best Response confirmed by batvan276 (New Contributor)
Solution

@batvan276 

 

You cannot track the changes to Status column & it's value using JSON code. Using JSON you can only customize how fields in SharePoint lists and libraries are displayed.

 

You might want to populate the no. of days column based on status change using Power Automate flow and then you can apply formatting using JSON:

Format a number column as a data bar 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.