cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jouke
Frequent Visitor

Populate Lookup with Null

Hi,

 

I'm building a flow that should populate some Lookup fields on a record in CDS. However, it is possible that some of these lookups are empty and therefor should be empty. I'm having trouble with this as Flow always expects a valid ID in the lookup. I tried the following expression and replaced null with blank, '' , etc. Nothing seems to work. Any ideas on how to do this? 

 

if(equals(<Record ID>, null), null , <Record ID>)

 

 

Thanks!!!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @jouke ,

 

As mentioned in my previous reply, if it is not a required field, you could check if the Id parsed in the above step is empty first.

If it is null, you could leave this lookup column blank.

Image reference:

21.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
efialttes
Super User
Super User

Hi!

Did you try with

 

concat('')

 

already?

 

If it does not work, my suggestion is to create a dummy record to represent null scenarios, and add its corresponding ID.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



jouke
Frequent Visitor

Thanks for the reply!

 

Concat doesn't work, it still expects an ID:

"message": "The supplied reference link -- -- is invalid. Expecting a reference link of the form /entityset(key).",

 

Creating a dummy record might be a workaround, I prefer the field to be empty though... Hope that's possible!

 

Hi @jouke ,

 

Could you provide a screenshot of the Flow configuration?

I have made a test on my side, if I enter null in the lookup column, the flow runs successfully.

6.PNG

Besides, you could use condition to check if record id is empty, if yes, leave the lookup column blank.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The flow creates a Contact record from a JSON, see below. It is possible for some lookups, Nationality for example, to be empty. When I try to fill the lookup with the JSON, it throws an error when its null. I tried with expressions as well, but i still get this error:

 

An error occurred while validating input parameters: Microsoft.OData.ODataException: The 'odata.bind' instance or property annotation has a null value. In OData, the 'odata.bind' instance or property annotation must have a non-null string value.

 

2020-03-24 11_39_03-Window.png

 

2020-03-24 11_33_05-Window.png

2020-03-24 11_33_31-Window.png

 

Hi @jouke ,

 

As mentioned in my previous reply, if it is not a required field, you could check if the Id parsed in the above step is empty first.

If it is null, you could leave this lookup column blank.

Image reference:

21.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi,

 

I realise this is an older reply, but can you tell me which connector you are using? I think this works in the old connector and not in the new Current Environment connector.

 

Best, Paul

jouke
Frequent Visitor

Hi Paul,

 

I'm using the CDS Current environment connector. 

Seems the only way i get this to work is using @v-bacao-msft

Hi!
Today I have talked with Microsoft Support and appear to be fixed. But in my environment still happens. This is something for a low-code platform unacceptable. I have to increase the complexity of my flow because of this. In addition, my flow is getting slow in the designer.

Same problem still exists in either scenario (including Current Env).

Spoke with Microsoft in a current ticket (120080424004016) and we received an update that this is not fixed and won't be made available until February - March timeframe. Very challenging when updating multiple lookups!

Digit89
Helper I
Helper I

You can use the CDS "Unrelate Record" action as a workaround while MS fix the possibility to set a null value.

Reference.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,719)