Forum Discussion

PaddyP1's avatar
PaddyP1
Copper Contributor
Oct 24, 2022
Solved

Formatting partially not working in Webpart

Hi all,

I have a strange phenomenon with a conditional formatted list view in webparts:

 

The lines in the list view is formatted as follows:

- if the column IFC (internal name $IFC) contains YES, format the line in Gold

- if the column Prozess-ID (internal name $LinkTitle) contains "n/a" format the line in CornflowerBlue

- if the line number is odd format the line in White

- if the line number is even format the line in LightGray.

This works fine.

 

But when I include this list view into a Webpart, the second format (n/a) does not work. Every other does so that the lines in question are formatted like odd or even.

 

Where is the formatting gone???

Does anyone have a similar problem? Or even better already solved it? 😉

 

Thanks in advance,

PaddyP1

  • PaddyP1 Make sure "Prozess-ID" column is included/shown in list view in web part.

     

    It is a known behavior of JSON formatting, in order to reference the column value in JSON, column should be included in list view.

     

    Also, make sure you are using correct internal name of your SharePoint column, follow: How to find the Internal name of columns in SharePoint Online? 


    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.

  • PaddyP1 Make sure "Prozess-ID" column is included/shown in list view in web part.

     

    It is a known behavior of JSON formatting, in order to reference the column value in JSON, column should be included in list view.

     

    Also, make sure you are using correct internal name of your SharePoint column, follow: How to find the Internal name of columns in SharePoint Online? 


    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.

    • PaddyP1's avatar
      PaddyP1
      Copper Contributor

      ganeshsanap 

      Thank you, your post led me to the solution...

      The thing is, that Prozess-ID is the former Title-column and is available in 3 different forms:
      - plain with not hyperlink behind

      - with hyperlink to element and menu modify

      - with hyperlink to element.

      I saw that the hyperlink-version was $LinkTitle, but I was not aware that I had to use $Title for the plain version instead of Prozess-ID. So JSON formatting didn't work though I added the column tho the view.

      Works fine now 🙂

Resources