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.
Solved! Go to Solution.
Hi @Anonymous,
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
Hi @Anonymous,
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
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
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.
User | Count |
---|---|
26 | |
4 | |
4 | |
3 | |
2 |
User | Count |
---|---|
28 | |
10 | |
9 | |
9 | |
7 |