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 / Copy Sharepoint Item c...
Power Automate
Unanswered

Copy Sharepoint Item containg null Lookup FIelds

(0) ShareShare
ReportReport
Posted on by 14

When using Flow to copy a item in a Sharepoint LIst to another SHareoint List, I am running into problems handling Lookup Fields.

 

If the source Sharepoint Item has a Lookup field and its empty (null) and you try to create a new item from this source the Flow will throw an error because FLow (much like SHarepoint Designer in the past) can not hanlde setting a Lookup field to Null.

 

I would like to know if there is way using expressions that I can test the input field (from the source item) for null and then do nothing to avoid the error thrown.    I know I can instead use a text field in the target and set it to the Lookup field value and that is one solution but not the best one.

 

This is a really simple Flow that archives items from one Sharepoint List into another but there are multiple lookup fields and all of them can be empty -- actually FLow should be able to hanlde setting a lookup field to null but if I could use an IF expression that tests for null that might be a reasonable workaround

Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

    Hi @ SPMP,

     

    I have made a test on my side and please refer to the screenshot of my flow as below:

    1.png

    Note:

    1. The sharepoint list “report” and “report1” both have a “lookup repairshop” column with type “lookup”
    2. The expression of the Condition as below:

    @empty(triggerBody()?['lookup_x0020_repairshop'])

     

    When an item is created in the “report” list, and the “lookup repairshop” column is null, the flow would run successfully as below:

    2.png

    When an item is created in the “report” list, and the “lookup repairshop” column is not null, the flow would run successfully as below:

     3.png

     

    Regards,
    Alice Zhang

  • SPMP Profile Picture
    14 on at

    Of course except I want to create an item for both conditions so this would be doable by adding another Create Item Action for the other branch and not include the Lookup column in that branch.

     

    But this does not solve the problem as we have lists that have 3, 4 or even 5 lookup columns  so with 4 lookup columns the logic complexity becomes amazingly complex with so many combinations of possibilities.   What I really need is to able to put an Expression in the Create Item lookup column that will do nothing if the input is null and use the value if it is not null -- there appears to be no way to do that.   WIth that capability I can have many lookup columns and I don't need any complex set of conditions with multiple Create Item actions.

     

    Seem pretty straightforward to me and your solution really only works realistically if there is ONLY one lookup column that could be null -- its really unacceptable if there are multiple lookup columns any one of which could be null.

  • UpTimize Profile Picture
    18 on at

    Hello

     

    Just stucked in the same issue and get it solved by passing ID=0 while the source item lookup field is null

     

    In this case, the copied  item will be created with an empty lookup value.

    I just use a condition If(empty(yoursourcelookupfield,null),0,yoursourcelookupfield)

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard