web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Add a record with odat...
Power Automate
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!
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,360 Super User 2025 Season 2 on at
    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.
  • fsuarezoedt Profile Picture
    46 on at
    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,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard