document that [$fieldName] only works if fieldName is in view
There is a section that explains that I can use [$fieldName] to do conditional formatting based on the value of other columns in my list. However, that section should contain an explanation that if fieldName is not part of the current view then this is NOT possible.
So if I have a view with fields A and B and my field A is formatted with style of "=if([$B]=='foo', { 'color': 'red' }, { 'color': 'yellow' })" that will work until I try it in a view of that list that does not contain column B. At that point I will always get yellow - just as if I used "=if([$NonexistentField]=='foo', ...)".
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 1aa6ae62-4dd8-3bdf-2f2c-f3f4a76e43b9
- Version Independent ID: 1aa6ae62-4dd8-3bdf-2f2c-f3f4a76e43b9
- Content: Formatting syntax reference
- Content Source: docs/declarative-customization/formatting-syntax-reference.md
- Service: sharepoint-online
- GitHub Login: @VesaJuvonen
- Microsoft Alias: vesaj
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues