Forum Discussion

Justmeck's avatar
Justmeck
Copper Contributor
Jan 12, 2024
Solved

Can I validate a colume based on athother colum?

Hello, i have a colume "FlowIsOn" that is a boolean and true if my power automate flow i turned on. I have antoher calculated field or rather a button that starts the flow. I have discovered that yo...
  • Rob_Elliott's avatar
    Jan 12, 2024

    Justmeck you don't need validation, all you need to do is to set the visibility property in the column where you've got your JSON-formatted button. By not being visible it can't be clicked:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "button",
      "txtContent": "Change Created By to Page Contact",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "='{\"id\":\"d25934c9-5059-47b0-864c-151e1d50796c\", \"headerText\":\" ' + [$Title] + '\",\"runFlowButtonText\":\"Go\"}'"
      },
      "style": {
        "background-color": "#ff4437",
        "color": "white",
        "border-radius": "10px",
        "visibility": "=if([$FlowRun] == true,'hidden','visible')"
      }
    }

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP (and classic 1967 Morris Traveller driver)

Resources