Hide Column Button Folder and URL

%3CLINGO-SUB%20id%3D%22lingo-sub-3245742%22%20slang%3D%22en-US%22%3EHide%20Column%20Button%20Folder%20and%20URL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3245742%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I'm%20trying%20to%20format%20a%20column%20based%20on%20the%20file%20content%20type.%20I%20have%20followed%20%22%3CA%20href%3D%22https%3A%2F%2Fwonderlaura.com%2F2018%2F07%2F18%2Fbutton-in-sharepoint-list-to-trigger-microsoft-flow%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EWonder%20Laura%3C%2FA%3E's%22%26nbsp%3B%20tutorial%20but%20I%20need%20some%20more%20help.%20I%20want%20to%20hide%20the%20button%20if%20the%20content%20type%20is%20a%20folder%20or%20a%20URL%20Link.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20posted%20the%20coding%20below%2C%20the%20bold%20and%20underline%20is%20what%20I'm%20trying%20to%20add%2Ffix%20to%20the%20code%20flow.%20I%20think%20it%20is%20a%20simple%20fix%2C%20but%20I'm%20not%20as%20json%20proficient%20as%20I'd%20like%20to%20be.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEDIT%3A%20After%20messing%20around%20with%20Content%20Types%2C%20an%20added%20link%20is%20the%20same%20as%20a%20Document.%20So%20ContentTypes%20may%20not%20be%20avenue%20to%20go%20down.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20JSON%20advance%20formatting%20schema%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22%24schema%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fv2%2Fcolumn-formatting.schema.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.microsoft.com%2Fjson-schemas%2Fsp%2Fv2%2Fcolumn-formatting.schema.json%3C%2FA%3E%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22elmType%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22button%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22txtContent%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Submit%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22customRowAction%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22action%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22executeFlow%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22actionParams%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%7B%5C%22id%5C%22%3A%20%5C%22**********Flow%20URL********************%5C%22%7D%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22attributes%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22class%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22ms-fontColor-themePrimary%20ms-fontColor-themeDarker--hover%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22style%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22border%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22none%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22color%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Green%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22background-color%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22transparent%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22cursor%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22pointer%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22visibility%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%3Dif(((indexOf(%5B%24ContentTypeId%5D%2C'0x0120'))%20%3D%3D%200)%2C'hidden'%2C%20'visible')%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CU%3E%3CSTRONG%3E%22visibility%22%3A%20%22%3Dif(((indexOf(%5B%24ContentTypeId%5D%2C'0x0105'))%20%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GO-LABS%20id%3D%22lingo-labs-3245742%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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