cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tejasvi_munge
Post Partisan
Post Partisan

Value must be a data entity record

Hi All,

 

I am creating an offline app and whenever I am trying to patch data into CDS when I have an internet connection, it is throwing me error saying "value must be a data entity record".

And data is not getting inserted.

 

What might be the possible reason for that? Is it because of Lookup column?

 

Any help will be appreciated. 

5 REPLIES 5
v-albai-msft
Microsoft
Microsoft

Hi @Tejasvi_munge ,

I think the issue you are facing is related to the lookup column. You can simply understand that the lookup field stores the related records in the parent entity, so try to use LookUp function to retrieve the related record based on the value you selected or your entered.

I assume that:

1. You have two table called “Table1” and “Table2”.

2. Table1 has a lookup column called “lookup1” from “Table2”.

So this is the formula:

Patch(Table1S,Defaults(Table1S),
{
Name:DataCardValue1.Text,
lookup1: LookUp(Table2S,Name=DataCardValue5.Selected.Name)
}
)

Above is just an example, you should replace with your own control name in the formula.

If I misunderstand, please let me know and provide some screenshots for helping me understand better.

Best Regards,

Allen

Hi @v-albai-msft ,

Thanks for the reply. I have used the same formula and it should work.
I think my issue might be this-

https://powerusers.microsoft.com/t5/Building-Power-Apps/Offline-issue/m-p/856844#M272292

 

Hi @Tejasvi_munge ,

I am not sure, since the article you provided just have one answer, which suggest to follow Shane Young's video.

For your issue, I would suggest you re-check your formula(you can also provide your code here so that I can find the difference with mine). Also, for a test purpose, don't edit the lookup column to see if you can successfully patch it.

Best regards,

Allen

 

Hi @v-albai-msft ,

This issue occurs only for below situation-

If I open the PowerApps Mobile, but not open the canvas app, then disconnect the internet, the issue will happen.

It works for below situation-

If I open the PowerApps Mobile, and open the canvas app, then disconnect the internet. And then connect the internet while sending the data.

Hi @Tejasvi_munge ,

Glad you have found the cause and solution.  You can mark your answer as a solution. This will benefit other community members who stuck with the same question.

Besides, if you want to dig into this issue then it would probably be best to open a ticket with Microsoft Support on this one.

Get Help + Support - Power Platform | Microsoft Docs

Best regards,

Allen

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (74,068)