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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition errors when ...
Power Automate
Answered

Condition errors when get items return empty Sharepoint record

(0) ShareShare
ReportReport
Posted on by 15

Hi,

I'm building a flow getting records from one Sharepoint list (List 1), then use the Title field from List 1 to search for records from another Sharepoint list (List 2). If Title field in List 2 matched, update List 2 data. If it's not, create new record in List 2 with List 1 data. The problem I have is when Get Items return empty records from List 2, it return errors shown in red highlighted. 

Flow error 1.png

and I use

Flow error 2.png

 

Would anyone please share with me your knowledge on how to resolve this issue.

Thank you.

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

    Hi @lechrisvan 

     

    Try to use the coalesce expression where you can default the values for nulls.

     

    Please see this video for how to use Coalesce expression.

     

    https://www.flowjoe.io/2021/04/30/power-automate-functions-coalesce-handle-null-values-from-objects/

     

    Thanks

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @lechrisvan Please put you condition out side Apply to each 2. Better use one compose after get items 2 and create length function then use condition and when you will pass ID in update item it will apply loop only to update item action.

    Please 'Thumbs Up' the posts that helped you and 'Mark as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • lechrisvan Profile Picture
    15 on at

    Thank you abm for such quick response.

    The issue I have is not Null Field. It's rather empty record return. I tried to use the function empty(body('Get_items_2')?['value']) and it also returns the error. Do you have any other hint?

    Thank you.

  • lechrisvan Profile Picture
    15 on at

    Thank you Hardesh15. I tried your suggestion but it did not work either. A query for List 2 must be executed for each List 1 returned record. It has to validate whether the same record of List 1 exists in List 2.

    Any other suggestions?

    Thank you.

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @lechrisvan 

     

    What error are you getting? Could you please post it?

     

    Thanks

  • lechrisvan Profile Picture
    15 on at

    Hi abm,

    This is what i got for the empty record. The error message appears very blur. 

    Flow error 3.png

  • lechrisvan Profile Picture
    15 on at

    Thank you both Hardersh15 and abm helping me on this issue. The problem was my looping. It took Hardersh15 suggestion but did not do it properly. I revised my design again and it works as shown.

    Flow error 4.png

    Thank you.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard