cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andriiko
Regular Visitor

Error on filtering Business Central's data in PowerApps

I've added a "Business Central (on-premises)" (uses API) connection to powerapps and I'm trying to represent something like a sales invoice card in small. I'm using the standard datasets salesInvoice, salesInvoiceLines, in accordance with the pages 5475 Sales Invoice Entity, 5476 Sales Invoice Line Entity.

When I try to filter lines per document the server response with error is shown (see screenshot below):

 

Error: Logical operator 'Equal' is not allowed. To allow it, set the 'AllowedLogicalOperators' property on EnableQueryAttribute or QueryValidationSettings.

If I use connector "Dynamics NAV" (uses the web services) I don't have such problem.

May be some CustomSettings's or objects's properties... no property from the error was found in CustomSettings file.

What can be the cause of this error? Any suggestions?

Thank you in advance!

14 REPLIES 14

Hi Daveed. What's the reason you want to store more than 2000 records in your app? CDS does not retrieve more than 2000 records. When using CDS it becomes possible to delegate your BC data, meaning you will only retrieve the data you need.

 

You can filter your datasource (CDS) to only retrieve the records you need. That's a better approach since you bring in less records, therefore it does not degrade performance. Your app will not show more than 500 records, but the moment you apply a filter the records that match the filter condition will be shown :-).

 

1. Configure virtual entities so that the item table becomes available in the CDS: https://community.dynamics.com/business/b/andreysnavblog/posts/expose-business-central-api-as-cds-vi....

 

2. Filtering your DataSource: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup.

 

Let me know if the above works out.

You sir are awesome, this is JUST the thing I was after. Thank you 😀

Happy to hear I could be of help. Cheers and have a great day! 😊


@misterpower wrote:

Hi Daveed. What's the reason you want to store more than 2000 records in your app? CDS does not retrieve more than 2000 records. When using CDS it becomes possible to delegate your BC data, meaning you will only retrieve the data you need.

 

You can filter your datasource (CDS) to only retrieve the records you need. That's a better approach since you bring in less records, therefore it does not degrade performance. Your app will not show more than 500 records, but the moment you apply a filter the records that match the filter condition will be shown :-).

 

1. Configure virtual entities so that the item table becomes available in the CDS: https://community.dynamics.com/business/b/andreysnavblog/posts/expose-business-central-api-as-cds-vi....

 

2. Filtering your DataSource: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup.

 

Let me know if the above works out.


Me again, I'm hoping you can clarify something. I have the virtual tables working a treat but when testing with another user who doesn't have a Business Central license they cannot use the PowerApp as the credentials keep getting rejected. However, when I give them a Business Central license they can use the app.

 

So my question is, to use CDS virtual tables from Business Central in a PowerApp do all users who intend to use the app need a business central license?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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