cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dlabar
MVP

How to perform and orderby descending of an aggregate for a CDS List action?

image.png

It took awhile, but I finally got the correct aggreagtion for my call, but now I want to do an Order By Desc of the Count aggregate, but I'm getting an error:

 

{
"status": 400,
"message": "The query node SingleValueOpenPropertyAccess is not supported",
"source": "Env.crm.dynamics.com",
"errors": [],
"debugInfo": "clientRequestId: 3ffb4d54-6610-4cb2-bbe3-0e9a93861ca3"
}
4 REPLIES 4
v-bacao-msft
Community Support
Community Support

 

Hi @Dlabar ,

 

It seems that using the fields generated by the aggregation as the basis for sorting is not supported.

Order by field here can only be sorted according to the fields existing in Leads entity.

Count is the value generated during the execution of this action, so it cannot be used during execution.

 

Best Regards,

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

Thanks for the reply @v-bacao-msft .  Is it documented anywhere that this is not supported?

I am having this same issue. @Dlabar or @v-bacao-msft  can you please provide appropriate query syntax for groupby + orderby. I have attached my current syntax.

Not sure, I usually create the query in the XrmToolBox's FetchXmlBuilder tool, it has an option to convert it to the Power Automate Parameters:

Dlabar_0-1672864130340.png

 

Also, you should probably be asking this as a question, and not add as a comment to another.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

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

Community Calls Conversations

Community Calls Conversations

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

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,139)