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 Apps
Answered

DataEntity Type

(0) ShareShare
ReportReport
Posted on by

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.

 

I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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

  • Community Power Platform Member Profile Picture
    on at

    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

  • john_p Profile Picture
    18 on at

    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-Relationship-LookUp/idi-p/152423 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.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard