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

Community site session details

Session Id : Xxiov+97TPaIPlXFhHEHFt
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 4 Dec 2023 08:25:33 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 

I have the same question (0)
  • Chriddle Profile Picture
    8,339 Super User 2025 Season 2 on 04 Dec 2023 at 09:02:33
    Re: Update item - if field is blank then ignore, if field is not blank then update

    Before the update, use "Get item".

  • Verified answer
    v-yetonggu-msft Profile Picture
    on 04 Dec 2023 at 10:06:38
    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 655 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 371 Moderator

#3
chiaraalina Profile Picture

chiaraalina 276

Last 30 days Overall leaderboard
Loading complete