Forum Discussion
JSON Formatting Referencing Calculated Date Column on SharePoint List
- Nov 30, 2018
For anyone else banging their head against the wall trying to get a similar scenario to work I found a solution after coming across this comment in a discussion on GitHub. Changing my calculated column to text instead of date and using the formula to display as a date allows the JSON formatting to "see" the date value to format the Phase column if the date is in the past. My calculated column is looking at multiple date (project phase gates) columns to give the next milestone, but in simple form it works in the attached screenshot.
Making a little bit of progress I thought I had it with coming across the date operator for another use case, but it still doesn't work with the calculated field. This screenshot shows it using a single line text field where it works, but if I change to the calculated column it doesn't. The Phase column is the one that I'm applying the formatting to.
Maybe there's a way to specify the calculated value as a string in this same JSON code?
- Jer HarwoodNov 30, 2018Brass Contributor
For anyone else banging their head against the wall trying to get a similar scenario to work I found a solution after coming across this comment in a discussion on GitHub. Changing my calculated column to text instead of date and using the formula to display as a date allows the JSON formatting to "see" the date value to format the Phase column if the date is in the past. My calculated column is looking at multiple date (project phase gates) columns to give the next milestone, but in simple form it works in the attached screenshot.