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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,158)