Forum Discussion
Is it possible to reference a list item value for headerText in actionParams
- Apr 02, 2021
Yes! You can do this using an expression that builds the escaped JSON needed for the actionParams. It's a bit confusing to look at with all of the escaped quotes, but it works!
The actionParams property can be set with an expression. In this case we are going to treat the whole thing like text by surrounding our escaped JSON value with single quotes. Then we can add our dynamic value as part of that text. So we can take your format and adjust the property value to an expression like this:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "button", "txtContent": "Req update", "customRowAction": { "action": "executeFlow", "actionParams": "='{\"id\":\"6876124d-ff27-47df-a446-06b9c64ed95a\", \"headerText\":\"Request update to ' + [$Purpose] + '\",\"runFlowButtonText\":\"Send update request\"}'" } }
Yes! You can do this using an expression that builds the escaped JSON needed for the actionParams. It's a bit confusing to look at with all of the escaped quotes, but it works!
The actionParams property can be set with an expression. In this case we are going to treat the whole thing like text by surrounding our escaped JSON value with single quotes. Then we can add our dynamic value as part of that text. So we can take your format and adjust the property value to an expression like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Req update",
"customRowAction": {
"action": "executeFlow",
"actionParams": "='{\"id\":\"6876124d-ff27-47df-a446-06b9c64ed95a\", \"headerText\":\"Request update to ' + [$Purpose] + '\",\"runFlowButtonText\":\"Send update request\"}'"
}
}
theChrisKent that works really well, thanks.
Rob
Los Gallardos
Microsoft Power Automate Community Super User