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 / Check if a Record is a...
Power Apps
Answered

Check if a Record is already exits Update Multiple items using patch function else Create New Row in SharePoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have an Excel Like Editable Grid that is using a PowerBIIntegration.Data as a data source. I have a save button on a screen, and when I click save (Multiple Items to Update Existing or Create Multiple item)
I want to update an Request_ID if it already exists in SharePoint else Create New item in the SharePoint list. . 
Here is what my logic looks like right now...

 

 

ForAll(
 Filter(
 Gallery1.AllItems,
 Toggle1.Value = true
 ),
 Patch(
 BSD,
 {
 Request_ID: TextInput1.Text,
 Family_Code: ComboBox4.Selected.Family_Code,
 SAP_Part_Number: TextInput2.Text,
 IEC_BLOCK: TextInput3.Text,
 JIC_BLOCK:TextInput4.Text,
 IEC_ETAG:ComboBox4.Selected.IEC_ETAG,
 JIC_ETAG:ComboBox4.Selected.JIC_ETAG,
 Electrical_Status:ComboBox4.Selected.Electrical_Status
 }
 ))

 

 

 

Condition

If(
 IsBlank(
 LookUp(
 'BSD',
 Request_ID = TextInput1.Text
 )
 ),

check condition request ID exists 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    Hi @Anonymous ,

    Here is some guidance on structure - you will probably get a Delegation warning on the Lookup, but that cannot be avoided

    Patch(
     BSD,
     ForAll(
     Filter(
     Gallery1.AllItems,
     Toggle1.Value
     ) As aPatch,
     With(
     wID:
     Lookup(
     BSD:
     Request_ID = aPatch.TextInput1.Text
     ).ID
     ), 
     {
     ID: 
     If(
     wID > 0,
     wID
     )
     Request_ID: aPatch.TextInput1.Text,
     Family_Code: aPatch.ComboBox4.Selected.Family_Code,
     SAP_Part_Number: aPatch.TextInput2.Text,
     IEC_BLOCK: aPatch.TextInput3.Text,
     JIC_BLOCK: aPatch.TextInput4.Text,
     IEC_ETAG: aPatch.ComboBox4.Selected.IEC_ETAG,
     JIC_ETAG: aPatch.ComboBox4.Selected.JIC_ETAG,
     Electrical_Status: aPatch.ComboBox4.Selected.Electrical_Status
     }
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    156,064 Most Valuable Professional on at

    Hi @Anonymous ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard