Hi,
I've a MS List in which there are two date columns. I've a calculated column which is dependent on these 2 date columns and it also contains Today() in its formula. So everyday the values have to be updated. So, I've setup a Power Automate flow. When I test manually, values are get updated. I thought the flow is working fine. the trigger is Occurence (Every day 5:30 AM) and when I checked next day, fklow ran successfully and in MS list Modified date is also changed. But values in calculates column are not updated. Then, I did Manual test, then values are updated.
So, why SharePoint list is getting updated for Manual test but not for Automatic flow run? And how to make Automatic flow updates the list?
Calculated columns do not refresh when a flow updates columns. You need to physically open the item and submit it again to refresh the calculated columns. If you want to do this with a flow, you will want to replace the calculated column with a column of the data type that is calculated, and then calculate and populate the field in Power Automate.
Depending on what you are doing, you may be able to use JSON formatting in your list to achieve what you want. For example, this will calculate the number of years on a date field:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if(Number(@currentField) == 0, 'N/A', '@currentField.displayValue' + ' (' + floor((Number(@now) - Number(@currentField)) / (31536000000)) + ' years)')",
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
}
}
It will show up in your list as:
JSON calculates in real time and doesn't require you to open the item to refresh the value.
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional