0

We are trying to build a collection, of the latest 500 items which does not have status = "Cancelled", now since "<>" will raise delegation warning, so i included all the other statues (other than the Cancelled status) inside the "=", as follow:

ClearCollect(
    colLast500,
    FirstN(
        SortByColumns(
            Filter(
                'Promotion Requests',
                'PRF Status' = "In Final Review" ||
                'PRF Status'= "Adding SAP Number" ||
                'PRF Status' = "In PRF Confirmation" ||
                'PRF Status'= "In Production" ||
                'PRF Status'= "In Promo Setup" ||
                'PRF Status'= "In Review" ||
                'PRF Status'= "In Setup and UAT" ||
                'PRF Status'= "In Translation" ||
                'PRF Status'= "In UAT - Online" ||
                'PRF Status'= "In UAT - Retail" ||
                'PRF Status'= "Online UAT - Passed" ||
                'PRF Status'= "Online UAT - Technical Fail" ||
                'PRF Status'= "PRF Declined by Promo Team" ||
                'PRF Status'= "PRF SKU List Declined" ||
                'PRF Status'= "Promo Scheduled - Online" ||
                'PRF Status'= "Promo Scheduled - Retail" ||
                'PRF Status'= "Ready for Production - Retail" ||
                'PRF Status'= "Ready for Setup" ||
                'PRF Status'= "Retail UAT - Passed" ||
                'PRF Status'= "Adding SAP Number" ||
                'PRF Status'= "Pending Approval"
            ),
            "ID",
            SortOrder.Descending
        ),
        500
    )
)

But this is not working well, as some statuses such as "Adding SAP Number" are been excluded (no items with this status will be returned even if they are within the 500 latest created). So is there any restriction on the number of "=" that we can add inside a filter?

4

1 Answer 1

1

There is no restriction/limitation on using multiple conditions inside Filter function in Power Apps.

I just tried using same formula on SharePoint list with more than 35000 items and it is working fine for me:

enter image description here

I will suggest you to add indexing on your PRF Status column. Follow below Microsoft official documentation for same:

Add an index to a list or library column

3
  • so you think this is not working because there is not index? Mar 30, 2023 at 12:22
  • You may face issues with filtering in case of large lists indexing is not used. So, try it once. Also check what is the Data row limit set inside App Settings > General > Data row limit. It should be 500 (or more if required by you). Mar 30, 2023 at 12:48
  • Is this working for you now? Mar 31, 2023 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.