Forum Discussion
SharePoint library choice column formatting
- Oct 10, 2023
Use [$__INTERNAL__] instead of @currentField in conditions like:
=if([$__INTERNAL__] == 'Sales', '#ff0000', if([$__INTERNAL__] == 'Marketing', '#006aff', if([$__INTERNAL__] == 'Warehouse', '#b882d7','green')))
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.
What is the issue exactly? Where are you facing issue while applying color or background color?
You may need to change the classes like "sp-css-backgroundColor-BgCornflowerBlue" in JSON as well which might be overwriting your colors applied via color and background-color properties.
You can also use the classes given here instead of using hex colors if these classes suits your requirements: SharePoint Online CSS Classes
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.
- ganeshsanapOct 10, 2023MVP
Use [$__INTERNAL__] instead of @currentField in conditions like:
=if([$__INTERNAL__] == 'Sales', '#ff0000', if([$__INTERNAL__] == 'Marketing', '#006aff', if([$__INTERNAL__] == 'Warehouse', '#b882d7','green')))
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.