Forum Discussion

Peter_K's avatar
Peter_K
Copper Contributor
Apr 17, 2019
Solved

Conditional JSON formatting of button in SharePoint List

Hi everybody   I am looking for a solution for a formatting problem in one of my sharepoint columns.  In one column I have a button which triggers a flow.    I am aiming for a visability of the ...
  • Maruthi Gadde's avatar
    Apr 18, 2019

    Peter_K 

     

    {
    "elmType": "button",
    "txtContent": "Get Approved",
    "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\":\"86dfdf10-8d99-4914-8e98-fe4b21ed7e34\"}"
    },
    "style": {
    "background-color": "purple",
    "color": "white",
    "visibility": "=if(([$ModerationStatus] == 'Pending') && ([$DocumentType] == 'Offer'),'visible','hidden')"
    }

    }

     

    check this sample .. I got rid of the Operator and used a simple if statement.  only change to visibility property.

Resources