cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

DataEntity Type

Hi, 

 

I am wondering if anybody has come across this error before and knows where i am going wrong? see Capture. 

 

I am trying to insert a new record into a CDS 2.0 Entity that has a n:1 Relationship, no matter what i try to referrence the LookUp Record it always comes up with the attached error. 

 

I have tried a LookUp to the record directly, as well as creating a temp collection of the record, i have also tried referencing the Required Name field as well as the Guid. 

 

ClearCollect(
    Accessibility,
{cl_accessibilityoptionsid:Blank(),
cl_StaffDetails:MyStaffDetails.StaffId,
cl_displayname:MyUserDisplayName,
cl_userid:MyStaffID,
cl_fadelevel:AS_Transparency_sli.Value,
cl_screencolour:ScreenColour,
cl_defaultfilter: AS_DefaultFilter_tgl.Value,
cl_red:R,
cl_green:G,
cl_blue:B
}
);
Set(As_Options, "Your Options have been Saved");
UpdateContext({AS_OptionsSaved:true});
Collect(AccessibilityOptions, Accessibility));

The LookUp field is cl_StaffDetails, MyStaffDetails is a local collection and StaffId is the Guid.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: DataEntity Type

Hi @Crai8088,

 

Do you want to insert a new record into your CDS entity using Collect function?

 

The error message told that the 'cl_StaffDetails' column is required to provide a DataEntity type value, but you provided a Text type value.

 

I have made a test, and the issue is confirmed on my side. There is no way to provided a DataEntity type value for a Lookup type column of CDS entity within PowerApps currently, I afraid that there is no way to add new record into a CDS Entity which contains a Lookup column using Collect function.

 

If you would like this feature to be added into PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to generate an app from your CDS entity, and then save your data into your CDS entity via clicking the "Submit" button within the Edit screen.

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: DataEntity Type

Hi @Crai8088,

 

Do you want to insert a new record into your CDS entity using Collect function?

 

The error message told that the 'cl_StaffDetails' column is required to provide a DataEntity type value, but you provided a Text type value.

 

I have made a test, and the issue is confirmed on my side. There is no way to provided a DataEntity type value for a Lookup type column of CDS entity within PowerApps currently, I afraid that there is no way to add new record into a CDS Entity which contains a Lookup column using Collect function.

 

If you would like this feature to be added into PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider take a try to generate an app from your CDS entity, and then save your data into your CDS entity via clicking the "Submit" button within the Edit screen.

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Highlighted
Advocate I
Advocate I

Re: DataEntity Type

Hi @v-xida-msft

 

Thank you for the response, i think i have wasted around 2 days trying every different scenario i could think off to get this to work. I have submitted an idea to have it added. 

 

Unfortunately recreating the app would not really be practical in this case as it is currently in a trial period with some of our services. With new items been added to it constantly. 

 

I already do have a work around as this was started prior to relationships been available in 2.0 i insert the Guid as a string to create my own relationships between the entities, the main problems around this has been delegation. 

 

Thanks

Craig

Highlighted
Frequent Visitor

Re: DataEntity Type

I have added a vote to your idea (link: https://powerusers.microsoft.com/t5/PowerApps-Ideas/option-to-insert-a-new-record-to-CDS-with-Relati... for other people having the same issue).

 

Although I'm new to PowerApps, I wanted to build some offline functionality in from the start, so I figured I'd just collect data from the CDS and then patch new records into it, but I hit the same issue of not being able to set a lookup value into CDS.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,989)