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

Community site session details

Session Id : arbOPT3I/ZmM8akqhqasNf
Power Apps - Building Power Apps
Answered

Remove all Sharepoint records matching a value

Like (0) ShareShare
ReportReport
Posted on 28 Sep 2023 10:34:14 by 147

Good day all,

 

I have a question and I am hoping someone can help me out. Currently I am working with two 'connected' Sharepoint lists. One for the records; 'Record List', one for more detailed information on those records; 'Detail List'. I match these records by having a column in 'Detail List' called Record_ID, which matches the ID value of 'Record List'.

 

Now I have built a function within a Power App gallery to remove a record from 'Record List' using the following code:

 

Remove('Record List', ThisItem)

 

 

But what I would like as well, is to have the same button remove all connected items in 'Detail List' as well. So I need a code to remove all items where the column Record_ID matches the ID of the selected item in the gallery.


Can anyone help me out with this?

Categories:
I have the same question (0)
  • Verified answer
    AndrewR1 Profile Picture
    1,572 Moderator on 28 Sep 2023 at 11:13:45
    Re: Remove all Sharepoint records matching a value

    Hi @Daniël you can try: 

    RemoveIf('Detail List', Record_ID = ThisItem.ID)

    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. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew

  • Daniël Profile Picture
    147 on 28 Sep 2023 at 12:28:39
    Re: Remove all Sharepoint records matching a value

    Thank you, that works! Something that also hindered me is that my 'Record_ID' column, was my title column. Oops!

     

    So it ended up being:

    RemoveIf('Detail List', Title = ThisItem.ID)

     

    Your code is very solid though!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard