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 / RemoveIf doens't work ...
Power Apps
Answered

RemoveIf doens't work for all users

(0) ShareShare
ReportReport
Posted on by 122

Dear Community,

 

We have a SharepointOnline List whitch collect data through the hole day from multiple users.

Now should a user next day be able to check the items from the last day and then press a button for example "Reset Daily" and then the Sharepoint List is Empty.

 

Now: The RemoveIf just works with my entries done in the list, but when a other people make a entry then his items aren't deleted.

 

Can anyone help me to clear the hole list?

 

Thanks, 

Categories:
I have the same question (0)
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @PMO_CH 

    The RemoveIf function isn't delegable. That's the most likely cause of this problem.

    This is what the documentation says:

    "When used with a data source, these functions can't be delegated. Only the first portion of the data source will be retrieved and then the function applied. The result may not represent the complete story. A warning may appear at authoring time to remind you of this limitation and to suggest switching to delegable alternatives where possible. For more information, see the delegation overview."

    https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-remove-removeif

     

    Can you confirm how many records many records you have in your list? If it's always going to be fewer than 2000, you can resolve this issue by increasing the delegation row count limit.

    If not, if you post your formula here, we may be able to suggest some alternative formula.

  • PMO_CH Profile Picture
    122 on at

    Hi @timl 

     

    Thanks, so there are max. 50 entries a day...

     

    Thats the Formula behind the button "on select"
    RemoveIf('Zaunkontrolle-Scan';true)

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @PMO_CH 

    I am not sure what you mean by 50 entries a day?

     

    The RemoveIf function can delegate as long as you provide delegable criteria.  Quite honestly, what good would a platform be if you could not update or remove items past the 2000 limit?

    However, the trick with RemoveIf, is that you need to specify the ID of the item you want to remove.

     

    In your case, RemoveIf(dataSource, true) will remove the first 2000 rows (if your record limit is set to 2000).  Subsequent evaluations of that formula will continue to remove the same amount.

     

    However, if you had a specific record - let's say record 10000 in your list and it happens to be ID 10000, and you use RemoveIf(datasource, ID=10000) it would remove it.

     

    I hope this is helpful for you.

  • PMO_CH Profile Picture
    122 on at

    Hi @RandyHayes 

    With 50 entries i mean rows filled from our users. (some different users)

     

    All i want is to clear this list (all rows) with a function within powerapps...

    or is there a other idea how to resolve ist?.

     

    Thanks.

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @PMO_CH 

    No, you are on the right track.  But, you need to know if your list is over the record limit set in your app.  If it is, then the function will not apply to items beyond that limit and you need to adjust to remove by ID.

    However, RemoveIf(yourList, true) will remove all the records of a list (again in the limits of your record limit).

  • PMO_CH Profile Picture
    122 on at

    Hy @RandyHayes 

    Thanks for your time.

    Attached the screenshot, the limit is set to max 500 Rows.

    But it seems it doesn't work with the RemoveIf.

    When i press the button "Delete Daily" (Picture "2") it deletes just my entries as People "A" when People "B" also makes a row then his row is still there and not deleted.

    Picture "3" gives you the idea what generate the row...

    Thanks again,

     

     

    3.png
    Screenshot 2021-03-21 174746.png
    2.png
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @PMO_CH 

    I am picking up on a subtle message in your posts...I believe (correct me if wrong) that you are stating that all of User A's records are deleted, but not B's  

    I am not sure how that factors in completely, but if other users are entering records in another app, then User A's app will not know about any of those changes.  Thus when you go to remove all...you are only going to be removing the items that the app knows about at that time.

     

    So, if this is in fact the case, then consider refreshing your datasource before issuing the RemoveIf.

    Ex.

       Refresh('Zaunkontrolle-Scan'); RemoveIf('Zaunkontrolle-Scan', true)

  • Verified answer
    PMO_CH Profile Picture
    122 on at

    Hi @RandyHayes 

    Thank you.

     

    I will try with your code tomorrow, sorry for my english 🙂

    We speak about just one App on different smartphones.

     

    I have already build a refresh-button and when i refresh i see all records also from other users.

    But when i push the button i will delete all.

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard