I'm pretty much new to JSON. I am formatting a SP form footer to show an Image (saved in SP folder) that will automatically update based on selected data from the Choice column
below code is working with only 1 condition:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "img",
"attributes": {
"src": "=if([$Criterias] =='Skills' && [$Awards] =='Personal' , 'https://xxxx.sharepoint.com/:i:/r/teams/IIICCCC/Shared%20Documents/IC%20ADHOC%202025/Rewards%20%26%20Recognition/Personal%20Development%20Criteria%20(Images)/Presentation.png?csf=1&web=1&e=TOjVGh', 'https://xxxx.sharepoint.com/:i:/r/teams/IIICCCC/Shared%20Documents/IC%20ADHOC%202025/Rewards%20%26%20Recognition/Personal%20Development%20Criteria%20(Images)/Blank%20Footer.png?csf=1&web=1&e=gdAknf')"
},
"style": {
"position": "relative",
"top": "100%",
"left": "100%",
"width": "100%",
"max-width": "100%",
"height": "100%",
"margin-left": "-100%",
"margin-top": "0%"
}
}
But if I add a condition. it's not working anymore. please see below code. thank you so much in advance.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "img",
"attributes": {
"src": "=if([$Criterias] =='Skills' && [$Awards] =='Personal' , 'https://xxxx.sharepoint.com/:i:/r/teams/IIICCCC/Shared%20Documents/IC%20ADHOC%202025/Rewards%20%26%20Recognition/Personal%20Development%20Criteria%20(Images)/Presentation.png?csf=1&web=1&e=TOjVGh', =if([$Criterias] =='Skills2' && [$Awards] =='Personal2' , 'https://xxxx.sharepoint.com/:i:/r/teams/IIICCCC/Shared%20Documents/IC%20ADHOC%202025/Rewards%20%26%20Recognition/Personal%20Development%20Criteria%20(Images)/Presentation222.png?csf=1&web=1&e=TOjVGh','https://xxxx.sharepoint.com/:i:/r/teams/IIICCCC/Shared%20Documents/IC%20ADHOC%202025/Rewards%20%26%20Recognition/Personal%20Development%20Criteria%20(Images)/Blank%20Footer.png?csf=1&web=1&e=gdAknf'))"
},
"style": {
"position": "relative",
"top": "100%",
"left": "100%",
"width": "100%",
"max-width": "100%",
"height": "100%",
"margin-left": "-100%",
"margin-top": "0%"
}
}