cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BenFetters
Level 8

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

JackCornish42
Level: Powered On

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.

Daniel01
Level: Powered On

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

Thanks Ben!

 

This solution worked for me! Smiley Happy

orangegroves
Level: Power Up

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.
JackCornish42
Level: Powered On

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

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.
JackCornish42
Level: Powered On

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.

Kingslee
Level: Powered On

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.

JackCornish42
Level: Powered On

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!
Daniel01
Level: Powered On

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
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 378 members 4,887 guests
Please welcome our newest community members: