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))
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://ORGURL.dynamics.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
What am I doing wrong in the expand query in the list rows action?
Any help is greatly appreciated.
Best regards,
Julien
Hi EBMRay ,
I created the below query.
Run in the Power Automate
I can see the value from the second join. Are you doing the same and not getting values?
Hello Abdul Wahab ,
Yes, the query is correct and returning the right results,please find below the results of the below query:
I tried to view the power automate parameters but it throws the below error:
As the error is showing I cannot add the linked entity of the department on the first level because it will not show up the relationship between the department and the first table.
(The department is related to the second link entity this is reason it is like that)
What do you suggest as a solution in that case?
best regards,
ebmray
Hi EBMRay,
The first and most important thing is. Are you able to run this query direct on CRM? Is it returning values in the second expansion?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156