I have a formatted Single Line Text field in a SharePoint Library. It is formatted to be a button that executes a Flow. I've created this so I can attach this one flow to multiple libraries. It works well for that purpose, but I need it to perform an additional action: update a different field for the current item.
There are 2 other fields:
- Publishing_Status (choice)
- Last_Published_Date (Date and Time)
Is it possible with a button like below to update the value of another field? Specifically to add a time stamp and select a choice for the choice field?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column- formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"ffa62926-6bbc-4db1-a409-1aeac8fdde93\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Flow"
},
"style": {
"padding-right": "6px"
}
},
{
"elmType": "span",
"txtContent": "Publish"
}
]
}
I wanted to use Flow to update the item, but as it may come from one of several libraries, it's not really possible (as far as I can tell).
Thanks.
Update Item
to update an item in another list, as last long as the connection account your Flow is using has access, it could even be in a different site. If you don't have the ID of the item you want to update, you can use theGet Items
action with an OData filter to find it by other metadata criteria.