web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch/Update problem
Power Apps
Unanswered

Patch/Update problem

(0) ShareShare
ReportReport
Posted on by 147

Hello everyone,

 

I have a problem with a patch / update function.
I would like to use a patch function to check whether a value is present in a dataverse table.

If so, the value will be updated, if not, create a new entry.
The information that should go in there comes from a gallery

 

I have the following patch function:


ForAll(Gallery2.AllItems;
Patch(tbl_listes;
Coalesce(LookUp(tbl_listes;

{
GUID:lb_SCHGUID.Text;
Surname:lb_SCHSurname.Text;
Name lb_SCHnameText;
Class:lb_SCHclass.Text
} Defaults(tbl_listes);
));;

 

My data records are transferred to the CDS,
but it is not checked whether they already exist.
I would like to filter by GUID, if present then update record,
if GUID does not exist then recreate record

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @memphis11 

    ForAll(
     Gallery2.AllItems;
     Patch(
     tbl_listes; {GUID:lb_SCHGUID.Text,
     Surname:lb_SCHSurname.Text;
     Name: lb_SCHnameText;
     Class:lb_SCHclass.Text
     }
     )
    )

     

    From: https://global-sharepoint.com/office-365/powerapps-power-platform/powerapps-bulk-update-using-forall-patch-function/ 

    !1.jpg

  • memphis11 Profile Picture
    147 on at

    Hello,

    thank you very much first...


    But unfortunately the patch sets the entries twice if the GUID already exists.

    So no update if the GUID is available

    there is no IF loop or a lookup missing

     

    greetings

  • memphis11 Profile Picture
    147 on at

    I just tried to write all values in a collection.
    That works, but I still have problems with the comparison of whether the GUID is available in the 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard