Forum Discussion
Deleted
Sep 19, 2023conditional json formatting for form footer - basic
I have used json to format a microsoft list footer with no json errors, but the function is not working. Here is excerpt: "display": "=if([$Column1] == 'A','display','none'), "txtContent": "...
- Sep 20, 2023
Deleted you're using the wrong style, it should be visibility, not display:
"visibility": "=if([$Column1]=='A', 'visible', 'hidden')"
For example:
{ "elmType": "div", "style": { "width": "100%", "text-align": "left", "overflow": "hidden", "border-top-width": "1px" }, "children": [ { "elmType": "div", "style": { "height": "15px", "width": "100%", "color": "#fff", "font-size": "13px", "border-top": "5px solid #eee", "background-color": "orange", "padding": "10px", "visibility": "=if([$Column1]=='A', 'visible', 'hidden')" }, "children": [ { "elmType": "div", "txtContent": "=if([$Column2] == '1' ||[$Column2] == '2', ' Dog ', 'Cat')" } ] } ] }
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP UK (and classic 1967 Morris Traveller driver)
Rob_Elliott
Bronze Contributor
Deleted you're using the wrong style, it should be visibility, not display:
"visibility": "=if([$Column1]=='A', 'visible', 'hidden')"
For example:
{
"elmType": "div",
"style": {
"width": "100%",
"text-align": "left",
"overflow": "hidden",
"border-top-width": "1px"
},
"children": [
{
"elmType": "div",
"style": {
"height": "15px",
"width": "100%",
"color": "#fff",
"font-size": "13px",
"border-top": "5px solid #eee",
"background-color": "orange",
"padding": "10px",
"visibility": "=if([$Column1]=='A', 'visible', 'hidden')"
},
"children": [
{
"elmType": "div",
"txtContent": "=if([$Column2] == '1' ||[$Column2] == '2', ' Dog ', 'Cat')"
}
]
}
]
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP UK (and classic 1967 Morris Traveller driver)
Deleted
Sep 20, 2023Rob_Elliott Thank you! Works perfect.