Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Add a record with odata.id null

(1) ShareShare
ReportReport
Posted on by 46
Hi
 
I want to add a record in a table but there are cases where I have a contact in that record and cases where I do NOT have a contact. So right now I'm using a conditional asking if the contact is null, and two actions to Add the record.

For other kinds of data, like strings, I can simply put the value in the field of a single Add record action and that will do. If the value is null, nothing will happen.
 
But for odata.id I get an error telling me that it can't be null.

My question is: Is there a way to use a single Add record with a formula that I'm missing?
 
Thanks!
  • fsuarezoedt Profile Picture
    46 on at
    Add a record with odata.id null
    Hi FLMike

    Yes, my Opportunities table has a relationship with the Contact table.

    But in some cases, I don't need to add that field in a record, and in some cases, I DO need to add it.

    Then, If I create a single Add record and put a variable in that field, if the variable is empty I get an error. The only way around this that I found is to create a conditional action that asks if the record needs or doesn't need the field and create two different Add record actions.

    My question is if there's a way to do a single Add record that encompasses both cases. If the field were a simple string, I can do that with an IF inside a formula. But using an IF with OData, I can put OData in the case the contact should be there, and... what to put when I don't want a Contact field with data?
    Regads,
  • Suggested answer
    Michael E. Gernaey Profile Picture
    43,417 Super User 2025 Season 1 on at
    Add a record with odata.id null
    Hi,
     
    So I am going to back you way up because lots is missing and I have to assume and don't like it lol.
     
    You created a table, that has a relationship with Contact yes???
     
    Or someone did, and whomever did, make it business required.  So there is no way to ignore it.
     
    That or please show your table/list and the columns and the requirements for it, so I can verify that is the issue.
     
    So if this is a Flow, and you see a Red * then its required and you cannot leave it blank and unfortunately thats the answer. To change the behavior you need to completely remove that table and recreate it and make it either optional or business recommended, neither will require it.

    Sucks but :-( thats it.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492