Forum Discussion

Jelmer's avatar
Jelmer
Copper Contributor
Nov 27, 2024

Column formatting not showing in SP2019

Hi there,

 

At our company we're using Sharepoint 2019 and at this moment we are unable to upgrade. Don't ask me why as I'm not in the position to change any of this. I believe we're on build odsp-next-publish-SP2019_SP2019_20240305.001 but I'm not sure. I found this in the source of the page.

 

I am referring to: https://techcommunity.microsoft.com/discussions/sharepointdev/column-formatting-not-showing-when-view-shown-in-a-list-web-part-modern-page-and/161460

 

In this topic the OP is asking if it's possible to "see" column formatting when embedding a list on a page. As far as I can tell this is impossible as the embedded list does not support this feature.

 

Then I see some people talking about the classic view/page in combination with a "Page Viewer" Web Part. I tried this, but it will then "iFrame" the entire page. Not just the list. This means I also see the header, footer, everything of that particular page... Which I obviously don't want.

 

So I'm asking you: is there a way to embed a list into a page in SP2019, which will respect my column formatting and won't show any of the other stuff on the page, just the list.

 

Right now I'm just trying to create a link on the fly based on some values. But if I can figure this one out, we'll have a bigger wishlist. This is the most important though..

If this is not possible, is there another way I could achieve the same sort of effect (generating a link based on the parameters of a particular item)?

 

The current JSON which works on a view of a list itself, but not on a embedded list on a page:

 

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "a",
      "txtContent": "Edit",
      "style": {
        "white-space": "nowrap",
        "padding": "5px",
        "border": "1px solid lightgrey",
        "border-radius": "5px",
        "margin-right": "5px"
      },
      "attributes": {
        "href": {
          "operator": "+",
          "operands": [
            "/sites/USWR000036/_layouts/15/NintexForms/Modern/EditForm.aspx",
            "?List=",
            "70e705b9-b409-4856-9091-ab86ccfebe7d",
            "&ID=",
            "[$ID]",
            "&Source=",
            "https%3A%2F%2Fxxx%2Exxxx%2Exx%2Fsites%2FUSWR000036%2FSitePages%2Fxxxx%2Easpx"
          ]
        }
      }
    }
  ]
}

 

No RepliesBe the first to reply

Resources