Forum Discussion
Can I validate a colume based on athother colum?
- 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)
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)
Rob_Elliott Thank you for the quick response and example really apreciate it. It worked but do you know if you can add the same button inside the diffrent items when you open a contact?
- Rob_ElliottJan 12, 2024Bronze Contributor
Justmeck no, executeFlow is not supported in a list form. You'd need to have a Power Apps customised form for that.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)