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.
and I use
Would anyone please share with me your knowledge on how to resolve this issue.
Thank you.
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.
Thank you.
Hi abm,
This is what i got for the empty record. The error message appears very blur.
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.
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 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.
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
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional