cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate V
Advocate V

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

@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

Highlighted
Advocate I
Advocate I

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

@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.

Highlighted
Anonymous
Not applicable

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

Thanks Ben!

 

This solution worked for me! 🙂

Highlighted
New Member

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

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.
Highlighted
Advocate I
Advocate I

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

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.
Highlighted
Community Support
Community Support

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

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.
Highlighted
Advocate I
Advocate I

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


@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.

Highlighted
Regular Visitor

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

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.

Highlighted
Advocate I
Advocate I

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

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!
Highlighted
Anonymous
Not applicable

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

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

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,181)