SOLVED

[Resolved] Flow button visibility based on choice values of another column

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3154270%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3EFlow%20button%20visibility%20based%20on%20choice%20values%20of%20another%20column%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3154270%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EHello%2C%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20show%20a%20flow%20button%20in%20one%20of%20my%20columns%20only%20if%20the%20choice%20value%20of%20another%20column%20is%20equal%20to%20either%26nbsp%3B%3CSTRONG%3EFailed%26lt%3B%5C%2FSTRONG%26gt%3B%20OR%26nbsp%3B%3CSTRONG%3ENo%26lt%3B%5C%2FSTRONG%26gt%3B.%20If%20the%20choice%20value%20is%20equal%20to%26nbsp%3B%3CSTRONG%3EYes%26nbsp%3B%26lt%3B%5C%2FSTRONG%26gt%3Bor%26nbsp%3B%3CSTRONG%3EIn%20progress%26lt%3B%5C%2FSTRONG%26gt%3B%20then%20the%20button%20shouldn't%20display.%3CBR%20%2F%3E%3CBR%20%2F%3E%26lt%3B%5C%2FP%26gt%3B%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3CPRE%20class%3D%22%5C%26quot%3Blia-code-sample%22%20language-applescript%3D%22%22%3E%3CSTRONG%3E%3CSTRONG%3E%3CSTRONG%3E%3CSTRONG%3E%3CCODE%3E%5C%22visibility%5C%22%3A%20%5C%22%3Dif((%5B%24SentToCx%5D%20%3D%3D%20%5C'Failed%5C')%20%7C%7C%20(%5B%24SentToCx%5D!%20%3D%20%5C'No%5C')%2C%5C'visible%5C'%2C%5C'hidden%5C')%5C%22%26lt%3B%5C%2Fcode%26gt%3B%26lt%3B%5C%2Fpre%26gt%3B%3C%2FCODE%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FPRE%3E%3C%2FP%3E%3CP%3E%26nbsp%3BI've%20tried%20using%20this%20code%20however%20it's%20not%20working%20as%20expected.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%5C%26quot%3Blia-inline-image-display-wrapper%22%20lia-image-align-inline%3D%22%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fgxcuf89792%2F%5C%26quot%3Bhttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F347305iA42F6B9F5368F4EA%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%5C%26quot%3B%22%20role%3D%22%5C%26quot%3Bbutton%5C%26quot%3B%22%20title%3D%22ChrisCundy_0-1644582123698.png%22%20alt%3D%22%5C%26quot%3BChrisCundy_0-1644582123698.png%5C%26quot%3B%22%20%2F%3E%26lt%3B%5C%2Fspan%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3154270%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3EDeveloper%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
Contributor

Hello,

 

I'm trying to show a flow button in one of my columns only if the choice value of another column is equal to either Failed OR No. If the choice value is equal to Yes or In progress then the button shouldn't display.

 

"visibility": "=if(([$SentToCx] == 'Failed') || ([$SentToCx]! = 'No'),'visible','hidden')"

 

 I've tried using this code however it's not working as expected.

 

ChrisCundy_0-1644582123698.png

 

2 Replies
best response confirmed by Chris Cundy (Contributor)
Solution
I've solved this using the following code:

"visibility": "=if([$SentToCx] == 'Failed','visible',if([$SentToCx] == 'No','visible','hidden')"

@Chris Cundy in the style property

"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer",
"visibility": "=if([$Title] == '5','hidden','visible')"
},