Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Request Operation is Invalid. The $top expression "Infinity" is not valid - Urgent



I have a big meeting tomorrow to present this onboarding app to HR and Execs and all of a sudden im getting the above error on all 3 of my galleries that are empty. As soon as i populate the galleries, the error goes away.


I havent changed anything in a couple of days and was 100% working on Monday.


Has anyone experienced this before??


Please help!



Continued Contributor
Continued Contributor

@PowerGell54 Actually, I just found out what was wrong I believe. Hopefully this works for any of you as well. I found that I didn't have anything in the list and that was somehow causeing the error. I customized the form in PowerApps but there was nothing in the list when I started so that might have been the error. Long story short, I clicked on Quick Edit, added data to a few fields and created an item essentially without hitting the new button, and then I clicked the customized form button again. It opened the form in powerapps that I had been working on except this time NO ERROR! 


Hope this was helpful. If this doesn't make anysense, please let me know! 


Kind regards,

Ben Fetters

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer

@BenFetters You're hit the nail on the head.


I can confirm that, if a given SharePoint list is empty, a PowerApps application will throw runtime errors if it happens to do any counting (Max, CountRows, etc.), searching, or filtering upon that list.

Not applicable

Thanks Ben!


This solution worked for me! 🙂

New Member

Thank you for the reply. Unfortunately the counting fix didn’t work for me. I wasn’t doing any form of aggregation or max/min. It is a pretty basic proof of concept that I was hoping to present tomorrow that was working earlier today. In addition, there will be times where an empty list will be possible so having an error that shows up when the list is empty wouldn’t be ideal.

Yeah, me and my coworker have realised that we're still getting errors despite the list having a single dummy entry. Different errors, mind you, but still seemingly related to the SharePoint list.

Hopefully we can get an official statement from a Staff member soon.
Community Support
Community Support

Hi @PowerGell54 ,

Have you solved your problem?


Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned.


Please make sure there are some records existed within the data source your Gallery connects to.

Also please consider take a try to turn off the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app, then re-load your app, check if the issue is solved.


If the issue still exists, please consider remove the data source connection from your app, then re-add it again, check if the issue is fixed.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft wrote:

Please make sure there are some records existed within the data source your Gallery connects to.

Hi, quick question - what should we do in the case that a list may occasionally not have any data in it? I've got an app that is designed around a list that will often be empty.

Off the top of my head, I think you can ensure your list have a dummy item in it, then create views that would exclude this item for your users. For power apps, you would have to create a Collection whose source is the sharepoint list with a filter to exclude the dummy data. 

ClearCollect(varMyCollection, Filter(sharePointList, Title <> "Dummy Title"))

I know it sounds like extra work, but it should work.

I was hoping we wouldn't have to do this, even if simply because of the fact that it was working fine yesterday (and that there's no reason it shouldn't work fine with an empty list). I'm currently using a dummy entry to bypass the error, but it just seems... Wrong.

Oh well, thanks for the help!
Not applicable

I don't know if this is related or not, but after a form has been successfully submitted, editing the content from within SharePoint lists is no longer possible. After selecting the item, clicking edit just opens the form. It use to bring up all the fields within SharePoint that could be edited and then just save (list format).


Anyone else having this issue?

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,327)