Forum Discussion
Conditional Formatting
It seems like there is an issue with the JSON file. Could you please validate your JSON. Also it could be great if you could share your JSON file with dummy data and conditions used so that it could be helpful for us to look into the issue. Please make sure you have removed any PII.
- Chrisfoster1330Jul 20, 2021Copper ContributorSo I am using simple formulas in column formatting and not really using JSON the formula for "Agent" is =if([$Category] == 'Agent', 'true', 'false') and JSON validator says the =if is wrong and it states it should be without the = but it is not a valid formula.
- Meghana-MSFTJul 22, 2021Former Employee
From the formula it seems like you are using Sharepoint list. Could you please let us know if it is the correct assumption? Also Please take a look at the formulae.
If you could guide us on the resource where you are using the formula, it will be great for us to try in the right direction.
- Chrisfoster1330Jul 22, 2021Copper Contributor
Meghana-MSFT Yes you are correct it is in a SharePoint List, And I am using it in a column called "Agent" and a column called "Team Meeting" and it is pointed at a column called "Category". So if the Category is "Agent" then only that field will be visible and likewise with the one for "Team". This function is working, however I am getting an error, when I am trying to view the record in the "Details Pane" and also none of the record is visible when you click on edit.
My formulas appear to be correct and like I said previously when I remove the formulas the form works as expected. Here are the formulas again: =if([$Category] == 'Agent', 'true', 'false') And =if([$Category] == 'Team', 'true', 'false')