“If the optional SharePoint fields are left blank the update via Power Automate in the second list changes the field to a blank value as opposed to leaving it as the original value.”
The usage of the SharePoint ‘Update item’ action can be a bit confusing. It’ll show all the fields you can update, but that doesn’t mean that all of them must be updated. If you want to keep the original value, you can just keep the field empty (unless it’s a mandatory field).
But it’s different if you use dynamic content as the field value. Once you use dynamic content, or an expression, it won’t keep the original value. Even if the dynamic content is empty, it’ll update the field – to an empty value.
How do you then use dynamic content while keeping the original value if it’s empty?
You’ll need the original value
Since it’ll always do an update, you’ll always need some value, either the original one or the new one. If you use an item based trigger (e.g. item is created/updated), you can get the original value as an output of the trigger. For other triggers get the value using ‘Get item’ action before the update.
Let’s use the second approach in this example, get the values with the ‘Get item’ action.
All the values will be available among the dynamic contents.
Keep the original value if there isn’t a new one
Once you have the original value, you can build an expression for the update. If the new value is empty, keep the original value, otherwise update it to the new one. It’ll be the same if(…) and empty(…) expressions as when updating a date/time column.
Replacing the <…> placeholders it can look as below:
Repeat the same expression with different values for all the fields.
To update SharePoint columns only if there’s a new value, Power Automate needs three things. It needs the previous value, the if(…) expression, and a check if the new value isn’t empty. Combine them together in a single expression and update the field only if there’s a new value.