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 Apps / Can't patch CDS entity...
Power Apps
Unanswered

Can't patch CDS entity or ClearCollect from it

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a really simple CDS entity SystemUsers (to differentiate from the default Users entity).    It only has two fields

System User Email and System User Name (neither of which are set as required).   

 

I am trying to patch a record into this entity using the following but it doesn't work.

 

Patch(SystemUsers,Defaults(SystemUsers),{cr842_systemuseremail:User().Email,cr842_systemusername:User().FullName})

I also tried reading back out of it to see if that worked using the following but that didn't work either

 

ClearCollect(SomeUsers,SystemUsers)

If I have a gallery bound to SystemUsers that works, and if I create an edit form bound to SystemUsers I can write an entry that way.

 

I've attached a screenshot of the entity here in case there is anything obvious.    Has anyone got any ideas as I am pulling my hair out and there is very little left!

I have the same question (0)
  • Verified answer
    StuartRidout Profile Picture
    Microsoft Employee on at

    Ignore me ... the reason the code didn't work was that I had the button set to View rather than Edit and I didn't realise that meant you can't click it and the code was never getting called.   You live and learn!  #everydayisaschoolday

     

    Move along now, nothing to see here!

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard