Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Copy a lookup field with blank value don't work (The supplied reference link -- xxxx-- is invalid)

(0) ShareShare
ReportReport
Posted on by 5

Hello,

 

I have an issue regarding a flow that copy a lookup field into a field. If in the CRM, the field has a value, the flow works fine. If the record is empty, the entire steps do not work and I have this message "The supplied reference link -- xxxx-- is invalid. Expecting a reference link of the form /entityset(key)."

I know that I can use some test conditions but I can have more than 10 fields to copy in the same step !

Comparing to the old way (Workflow) where it was easier, I'm lot.

 

Do you know a way to force the copy even the value is empty ?

 

Many thanks

  • shadzk Profile Picture
    15 on at
    Re: Copy a lookup field with blank value don't work (The supplied reference link -- xxxx-- is invalid)

    I was having error this error: The supplied reference link -- systemusers() -- is invalid. Expecting a reference link of the form /entityset(key).

     

    I just used this and it worked

    shadzk_0-1705407657439.png

     

  • Verified answer
    abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: Copy a lookup field with blank value don't work (The supplied reference link -- xxxx-- is invalid)

    Hi @FranckBLA 

     

    Not sure you can use the coalsec expression with contact to construct the string you want.  Since these are composite lookups I can see you are setting with entity schema name and dynamic mapping value. So your only option is the IF condition for each ones. 

    Thanks

  • FranckBLA Profile Picture
    5 on at
    Re: Copy a lookup field with blank value don't work (The supplied reference link -- xxxx-- is invalid)

    Thanks for your answer,

     

    The screenshots below show how I set steps into CRM.

    As I can have a lot of fields to copy, I though that use If condition is not a solution.

    I can try the others solutions you  propose. Can you help me please ?

     

    Capture0.JPGCapture1.JPG

     

     
  • abm abm Profile Picture
    32,506 Most Valuable Professional on at
    Re: Copy a lookup field with blank value don't work (The supplied reference link -- xxxx-- is invalid)

    Hi @FranckBLA 

     

    You can achieve this in different ways.

     

    1. Add an If condition to check whether the value is null or empty then set the variable as null or the value.

    2. Try using expression coalsec(yourdynamicfield,null). This might be easier. I haven't tested from my side. So please try and let me know.

    3. You can add one single expression like below

        if(greater(length(outputs('Compose')),0),float(outputs('Compose')),null)

     

    Thanks

     

    Thanks

  • efialttes Profile Picture
    14,756 on at
    Re: Copy a lookup field with blank value don't work (The supplied reference link -- xxxx-- is invalid)

    Sharepoint? Dynamics? CDS?

    Can you share a screenshot from your current flow design?

     

    Did you tried aready with a WDL conditional expression empty() based?

    if(empty(<your dynamic content here>),'',<your dynamic content here>)

     

    Thanx!

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