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

Remove Items from more than one SharePoint list

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • 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
    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
    on at

    thanks h-nagao that worked a treat!

     

    appreciate your prompt resonse

     

    Mike

  • Community Power Platform Member Profile Picture
    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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard