Power Apps “RemoveIf” and “UpdateIf” are NOT delegable function.|Recommend combined use with “With” or “Filter” function.

I didn’t know that “RemoveIf” and “UpdateIf” are not able to delegate to data source and got unexpected results, so here is noted the summary.

スポンサーリンク

“RemoveIf” and “UpdateIf” are NOT delegable function.

When RemoveIf or UpdateIf is used for data sources such as SharePoint lists or Dataverse, the processing cannot be delegated to the data source.

Meaning that when you use these functions, the search will only be performed from the beginning of the data source up to the number of rows set as “Data Row Limit”.

Let’s see some examples.

Advance preparations.

I prepared the SharePoint list as below,
and set “Data Row Limit” to 5.

We’ll see how “RemoveIf” works toward this SPO list.

Failed to remove items with “RemoveIf” function.

For the list prepared in advance, I wrote “RemoveIf” “to delete items with a Num column of 5 or more” and executed it,
Only items with a Num column “5” was removed as below.

This is because the “RemoveIf” doesn’t support delegation, therefore only the first 5 items (Num columns 1~5) were searched for, then items that meet the condition (only an item with Num column 5 in this case) were deleted.

※The reason why only the first 5 items were searched for was because the “Data Row Limit” was set to 5.

Combined use with “Filter” function.

Well… how about combine it with “Filter,” a typical function that can be delegated!
On pressing button, the error “The specified data source is not available for this function” occurs…

It seemsIt seems RemoveIf and Filter cannot be combined…

Combined use with “With”, “Filter” and “Remove” function.

So I wrote as following, combining “With”, “Filter” and “Remove” functions, then pressed the button
Compared to earlier, it’s better result.

However, as you can see, the data that can be removed is only the data for the “data row limit” (5 Num columns from “5” to “9” in this case).

In conclusion, when executing RemoveIf or UpdateIf on a data source with a large amount of data, it is necessary to be careful that they can’t delegate, and to write the process to avoid omissions of deletion or update.

コメント

Copied title and URL