web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Expand Query

(0) ShareShare
ReportReport
Posted on by 28

I am trying to expand a query from List records. I noticed there are two different actions depending on if you use CDS (current environment) or CDS. In my example below "List records" is CDS (current environment) and "List records 2" is CDS. When I put the same expand query in both, only CDS (current environment) shows up. Can someone explain the different and how to solve this?

 

Thanks in advance

 

lokeshpatel_0-1598020674872.png

 

Categories:
I have the same question (0)
  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @lokeshpatel 

     

    In your HTML table, you are using the Value from your List records, This is why you cannot reference the List records 2

  • lokeshpatel Profile Picture
    28 on at

    Thanks @Jcook ,

     

    Unfortunately, that's not the issue. I have switched it before and it still does not populate. I would use the other CDS however, then I wouldn't be able to get the labels for option sets. 

     

    Should I populate a different input?

     

    Thanks!

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @lokeshpatel 

     

    Yes try using a Compose action, or use a select action and make sure the Value is the one from List records 2

     

    Also you can try and paste this into the From field in HTML table:

    @outputs('List_records_2')?['body/value']

    like this:

    Jcook_0-1598029715850.png

     

    Jcook_1-1598029831983.png

     

     

  • lokeshpatel Profile Picture
    28 on at

    @Jcook 

     

    The example above was a sample. Here is the solution I'm implementing:

     

    lokeshpatel_1-1598031746939.png

     

    The issue I am getting is related to:

     
     

    https://powerusers.microsoft.com/t5/Building-Flows/Bug-in-Dynamics-List-Records-Action-JSON-gets-escaped/td-p/186437 

     

    photo.jpg

     

  • Verified answer
    Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @lokeshpatel 

     

    You want to parse the owninguser field since the expand brings the field over as a JSON object.

     

    You can use a Parse JSON action and use this expression in the Content input:

    first(outputs('List_records')?['body/value'])?['owninguser']

    What I did was run this with Schema as {}

    Than copied the JSON from the run and used Generate from sample to create the schema

     

    Jcook_0-1598034342369.png

     

    Doing this, you will be able to reference the values inside the expand query

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard