cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Julien2
Super User
Super User

Double expand query does not return data

Hello,

I am trying to do a double expand query in the "List rows action" for dataverse to fetch data from related entities and as a result, it only returns an outcome from the first expand as for the second expand it does not return the headofdepartment value

new_JobPosition($select=_cr884_department_value;$expand=cr884_Department($select=_new_headofdepartment_value))

 

Power Automate Expand Result.png

Julien2_0-1669627463113.png

 

Knowing that the expand query logically is correct and also to make sure that I have used the OData Web API with the same logic and that it returned the desired outcome:

https://ORGURLdynamics.com/api/data/v9.2/cr884_job_title_histories?$select=statecode,_cr884_employee_no_value,_new_jobposition_value,cr884_end_date,_new_companyname_value&$expand=new_JobPosition($select=_cr884_employee_value,cr884_job_positions,_cr884_department_value;$expand=cr884_Department($select=_new_headofdepartment_value))&$filter=(_cr884_employee_no_value eq ce425204-aaa6-ec11-983f-0022489ef0f2 and statecode eq 0) and (new_JobPosition/cr884_job_positionid ne null)&$orderby=createdon desc&$top=1

 

Odata result.png

What am I doing wrong in the expand query in the list rows action?

Any help is greatly appreciated.

Best regards,
Julien

Best regards,

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @Julien2 

 

Remove the Expand query or FetchXML. Only one should work in my knowledge. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

2 REPLIES 2
fchopo
Super User
Super User

Hi @Julien2 

Have you tried removing the "Fetch xml query" field? Maybe it has to do with the fields you're selecting. Have a look about a similar issue in this post by Sara Lagerquist: A Double Expand Query and Some Missing Dynamic Content in Power Automate – Sara Lagerquist

Hope that helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
abm
Super User
Super User

Hi @Julien2 

 

Remove the Expand query or FetchXML. Only one should work in my knowledge. 

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (6,311)