0

enter image description hereI am just adding some JSON code to my columns to change the text color. All columns work as expected, but one ("Doc. #", a completely vanilla single line text column) keeps removing the code immediately after saving.

Preview works and looks ok, save seems to work, but the code disappears a second or so after closing the editor.

Any advice on how to solve this?

Code used:

{
  "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
  "elmType": "div",
  "style": {
    "color": "black"
  },
  "txtContent": "@currentField"
}
  • I have tried the same on single line of text field and it is working fine. are you missing something? What is the internal name of your field? Can you add any screenshot or anything what exactly you are doing? – Ganesh Sanap Aug 20 '19 at 7:16
  • Updated with image. Also tried changing the "#" to "number", with no effect – Niklas Aug 20 '19 at 7:40
0

I get a 502 error if I paste your schema's URL into the browser where as alternative URLs, such as https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json do load the JSON, so I suspect that may be your issue.

  • That's odd, it works just fine in all my other columns. I tried your URL, same issue as before: preview works fine, no error messages when saving, but goes back to normal as soon as the editor is closed. – Niklas Aug 20 '19 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.