Scenario: My sharepoint list just reached over 500 records. I have a powerapp to add new records and search those records. I only need to be able to search the last 200 records from the current date.
Initially I used the below code to list the records and filter them by the search box:
SortByColumns(Filter([@'PurchaseOrders-List'], TextSearchBox1.Text in Items ), "PODate", If(SortDescending1, Ascending, Descending))
Once I went over 500 records, I noticed it would not find recently added records. So I found that I could limit the search by the last 200 by using the below code:
FirstN(Sort('PurchaseOrders-List', PODate,Descending),200)
However, I still need to be able to search those 200 records with a search box (TextSearchBox1), So I tried combining the two :
FirstN(Sort(Filter([@'PurchaseOrders-List'], TextSearchBox1.Text in Items), PODate, Descending), 200)
But as soon as I added the "Filter", It wont show me any of the recently added records (above 500), even though the prior "FirstN" did show them. Is this because I am unable to filter the FirstN ?
FYI:
I know I can expand my powerapps to 2000 max, but I will still eventually run into this issue, so I wanted to set it up properly now.
Does anyone now how to do this with the FirstN statement?
thanks for your time