web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Coalese and replace in...
Power Automate
Unanswered

Coalese and replace in flow

(0) ShareShare
ReportReport
Posted on by

Hi all. I have a bit of trouble with updating a string in SharePoint list items if the field is blank. I have tried to do a combination af Coalese and Replace, but it fails for me everytime. All I want is to avoid the "null errors" whenthe flow runs. The flow is at this time pretty simple:

 

A select component to pick the columns I need to make changes to:

Error01.jpg

A for each control, where I want to make the magic:

Error02.jpg

 

I have tried several things, for example:

Coalese(item()?['Column3'],'',replace(item()?['Column3'],'Old text','New text'))
if(coalesce(item()?['Column3'],'',replace(item()?['Column3'],'Old text','New text')))

Can anyone guide me in a correct direction, so I can make the changes to the list items without getting the "null error" when the field is blank. All I want is that if the field is not blank, then I need to replace a string, but I keep running into these "Null errors".

 

Thanks in advance

/Frank

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    Try the below expression

    Coalese(item()?['Column3'],'New text'))

     

    You can use the coalesce function to provide default values when a value is null. So in your case if the value is null then it will replace with 'New Text'.

     

    Thanks

  • Community Power Platform Member Profile Picture
    on at

    Hi @abm and thx for quick reply. All I want is to avoid the blank fields, so if a field is blank, the flow should just ignore it, and continue til a field that has data. I cannot get your solution to do this 😐

     

    /Frank

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    Try the following

     

    if(equals(length(item()?['Column3']), 0), 'New Text', 'Old Text')

     

    Thanks

     

  • Community Power Platform Member Profile Picture
    on at

    Thx @abm It was not directly what I wanted but it led me in the right direction 🙏

     

    Frank

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard