SOLVED

Formatting partially not working in Webpart

New Contributor

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

4 Replies
best response confirmed by PaddyP1 (New Contributor)
Solution

@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.


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.

@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 :)

@PaddyP1 Great, glad it worked for you. JSON formatting supports internal name of column and not display name.

Check: How To Find the internal name of SharePoint column 


Please consider giving Like if my post helped you in any way.

@ganeshsanap
Good to know! Especially when fields are named field_1, field_2 internally... not very helpful for clear code!