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 / Remove Items from more...
Power Apps
Answered

Remove Items from more than one SharePoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I want to remove items from two SharePoint lists when a Delete icon is selected. I am able to do this for one SharePoint list using this formula: Remove('PO Log', Gallery1.Selected);  If (IsEmpty(Errors('PO Log', Gallery1.Selected))

 

But also want to remove multiple items in another list (POOrderDetails).  The column they both have in common is: PONumber. Does anyone know how i can adjust the above formula to do this? I have looked at the Remove function info page for PowerApps but am none the wiser as the examples used are only for one list.

 

Any help would be much appreciated

 

thanks

 

Mike

 

 

Categories:
  • Verified answer
    h-nagao Profile Picture
    392 on at
    Hi mike,
    Your app already connected to ‘POOrderDetails’ ?
    If so, could you try to add following formula after Remove(‘PO Log’...) ?

    RemoveIf(‘POOrderDetails’,PONumber=Gallery1.Selected.PONumber)

    RemoveIf function will remove record(s) from data source if satisfying condition.
    In this case, remove records from POOrderDetail when their records have same PONumber as selected in Gallery.

    Thanks, Hiro
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you also want to remove multiple items whose PONumber column value is equal to the PONumber value of the selected item in your Gallery1?

    I have made a test on my side, please take a try with the following workaround:

    Set the OnSelect property of the "Remove"  button to following:

    RemoveIf('POOrderDetails', PONumber = Gallery1.Selected.PONumber); /* <-- Add formula here. Please type this formula before the Remove('PO Log', Gallery1.Selected)*/
    Remove('PO Log', Gallery1.Selected);
    If(
    IsEmpty(Errors('PO Log', Gallery1.Selected)),
    ...
    )

    Or

    Remove('POOrderDetails', Filter('POOrderDetails', PONumber = Gallery1.Selected.PONumber)); /* <-- Add formula here. Please type this formula before the Remove('PO Log', Gallery1.Selected)*/
    Remove('PO Log', Gallery1.Selected);
    If(
    IsEmpty(Errors('PO Log', Gallery1.Selected)),
    ...
    )

    More details about Remove function and RemoveIf function, please check the following article:

    Remove function, RemoveIf function

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    thanks h-nagao that worked a treat!

     

    appreciate your prompt resonse

     

    Mike

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Kris,

     

    Yes your formula is smiliar to the one i applied, thanks for your response,

     

    kind regards,

     

    Mike

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard