Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Top count" is not applied in Portals query string #15

Closed
mgdevelop-hub opened this issue Mar 3, 2023 · 5 comments
Closed

"Top count" is not applied in Portals query string #15

mgdevelop-hub opened this issue Mar 3, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mgdevelop-hub
Copy link

I'm getting an issue on Dataverse Rest Builder for XrmToolBox. I'm trying to use a "top count" but the $top=X insn't applied in querystring. I'm using the lastest version (1.0.0.42).

Regards.

@GuidoPreite
Copy link
Owner

can you post a screenshot of the request and a screenshot of the generated code?
the top clause is missing from all the generated code options or just one?
Thanks

@GuidoPreite GuidoPreite self-assigned this Mar 3, 2023
@mgdevelop-hub mgdevelop-hub changed the title "Top count" is not applied in query string "Top count" is not applied in Portals query string Mar 3, 2023
@mgdevelop-hub
Copy link
Author

mgdevelop-hub commented Mar 3, 2023

The top clause is missing in the Portals tab.

TopCountQueryEditor

TopCountQueryPortal

@GuidoPreite GuidoPreite added the bug Something isn't working label Mar 3, 2023
@GuidoPreite
Copy link
Owner

thanks for the screenshots. In the other requests (except Xrm.WebApi) I use the odata.maxpagesize header (because $top can't be used together with $count option (documentation link: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query-data-web-api#use-top-query-option)

I am not sure if a header can be passed to a safeAjax without destroying the existing header (__RequestVerificationToken, required for the authentication).

For your specific situation I suggest to add manually the $top clause, meanwhile I will try to check how the Portals call acts with a supplied header.

Thanks for reporting the issue.

@GuidoPreite
Copy link
Owner

@mgdevelop-hub quick update about this issue. Next version of DRB will contain the correct header (odata.maxpagesize) to implement the top count functionality also inside Portals. I can't give you an exact date when it will be released as I plan to fix some other parts too.

@GuidoPreite
Copy link
Owner

@mgdevelop-hub I released a new version of Dataverse REST Builder (1.0.0.43) and now supports the Top Count clause for the Portals syntax.
Thanks again for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants