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 / If record already exis...
Power Apps
Answered

If record already exist into SharePoint than need to update it else create new record

(0) ShareShare
ReportReport
Posted on by 194
Hello All
I have one Power app that submitted data into the Shrepoint List.
I am using Flow for that because it also creates documents in Sharepoint.
My Query:
If the recored already exists in Sharepoint List (we need to check based on "Document Type" and "EntityID"), then we need to update that record with new values, otherwise create a new entry.
 
So can anyone guide me through what I need to do?
 
My Flow:
Viral21_0-1677817860017.png

My Power apps button code:

Viral21_1-1677818010932.png

 

Categories:
I have the same question (0)
  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @Viral21 

    You can use the 'Get items' action with the Filter Query to check for "DocumentType" &"EntityID". Then, use the length() function inside a Condition to check if a record exists. If length = 0, then it doesn't exists.

     

    So, you'd use the 'Yes' side of the condition to create an item, and the 'No' side to Update an existing item.

     

    This blog post runs you through what you need

    https://tomriha.com/how-to-check-if-sharepoint-item-already-exists-in-power-automate/

     

  • Viral21 Profile Picture
    194 on at

    Hello @EddieE 
    I have updated flow as per your suggestion, but I get below error.

    Can you please help me how I need to write filter query code?

    My SharePoint List Columns Name: "Entity ID" & "Document Type"
    Note: I pass value for that from power app 

     

    Error.png

     

  • EddieE Profile Picture
    4,650 Moderator on at

    @Viral21 

    Spaces in column names need to be written differently in the Filter, ie

    'Entity ID' should be

    Entity_x0020_ID

     

    ... and so on

  • Viral21 Profile Picture
    194 on at

    @EddieE I wrote without space like "EntityID" and it's working fine.
    Thanks for your support

     

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard