Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Update item - if field is blank then ignore, if field is not blank then update

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have a flow that is using a master list to update another list. When i input data into a list it needs to update the other list, but if i list a field empty, i want it to keep whatever is already in the destination list. 

 

Flow1.PNG

 

I've been trying to use the if(empty( function but i keep getting errors. 

 

if(empty(triggerBody()?['Supervisor']?['DisplayName'])),item()?['Supervisor']?['DisplayName'],triggerBody()?['Supervisor']?['DisplayName']))
 
Flow2.PNG
 
Essentially what i want to achieve is if the Supervisor name on the master list is not changed, then leave the destination list as it.

So i've setup the if statement to look be like this-

if(empty("When an item is created Supervisor Display Name")),"Get Items Supervisors Display Name","When an item is created Supervisor Display Name"))

 

I keep getting this error "The input parameter(s) of operation 'For_each' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'For_each'."

 

Not sure if that makes sense, if not please ask for more information.

 

Thanks,

Kyle 

  • Verified answer
    v-yetonggu-msft Profile Picture
    on at
    Re: Update item - if field is blank then ignore, if field is not blank then update

    Hi @Kyledonohue ,

    Please try this expression:

    if(empty(triggerBody()?['Supervisor']?['DisplayName']),items('For_each')?['Supervisor']?['DisplayName'],triggerBody()?['Supervisor']?['DisplayName'])

    Best Regards,

    Sunshine Gu

  • Chriddle Profile Picture
    7,892 Super User 2025 Season 1 on at
    Re: Update item - if field is blank then ignore, if field is not blank then update

    Before the update, use "Get item".

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1