Oct 24 2022 09:08 AM
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
Oct 26 2022 01:48 AM - edited Apr 17 2023 04:19 AM
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.
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.
Oct 26 2022 05:16 AM
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 🙂
Oct 26 2022 08:01 AM - edited Apr 17 2023 04:17 AM
@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.
Oct 26 2022 08:10 AM
Oct 26 2022 01:48 AM - edited Apr 17 2023 04:19 AM
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.
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.