Hide Column Button Folder and URL

New Contributor

Hi, I'm trying to format a column based on the file content type. I have followed "Wonder Laura's"  tutorial but I need some more help. I want to hide the button if the content type is a folder or a URL Link.

 

I posted the coding below, the bold and underline is what I'm trying to add/fix to the code flow. I think it is a simple fix, but I'm not as json proficient as I'd like to be.

 

EDIT: After messing around with Content Types, an added link is the same as a Document. So ContentTypes may not be avenue to go down.

 

This is the JSON advance formatting schema:

{
"elmType": "button",
"txtContent": "Submit",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"**********Flow URL********************\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"color": "Green",
"background-color": "transparent",
"cursor": "pointer",
"visibility": "=if(((indexOf([$ContentTypeId],'0x0120')) == 0),'hidden', 'visible')",
"visibility": "=if(((indexOf([$ContentTypeId],'0x0105')) == 0),'hidden', 'visible')"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Flow"
},
"style": {
"padding-right": "6px"
}
}
]
}
0 Replies