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

Dynamics 365 oData Query with Expanded Entities treated as Strings

Hi,

 

I am using the following query "[ORGURL]/api/data/v8.2/contacts?$select=fullname&$expand=owninguser($select=fullname)" with the list records (v2) action in order to get a list of contacts and the name of the owning user. However, the object that contains the user field fullname is being treated as a string value by Flow so it is not selectable in the Dynamic Values list. 

 

The response is similar to the below when viewed in browser:

 

{
  "@odata.context":"https://ORGNAME/api/data/v8.2/$metadata#contacts(fullname,owninguser,owninguser(fullname))","value":[
    {
      "@odata.etag":"W/\"115389388\"","fullname":"Bob Smith","contactid":"356cd10f-128f-e711-811a-5065f38aba21","owninguser":{
        "fullname":"Main User"
      }
    },{
      "@odata.etag":"W/\"115389389\"","fullname":"Dave Smith","contactid":"22eaf71c-128f-e711-811a-5065f38aba21","owninguser":{
        "fullname":"Main User"
      }
    },{
      "@odata.etag":"W/\"115454390\"","fullname":"Kelly Smith","contactid":"766c2b6e-ae93-e711-8113-5065f38ba451","owninguser":{
        "fullname":"Secondary User"
      }
    },{
      "@odata.etag":"W/\"115554225\"","fullname":"Danny Smith","contactid":"2b8be175-ae93-e711-8113-5065f38ba451","owninguser":{
        "fullname":"Secondary User"
      }
    }
  ]
}

 

However, in flow it appears as:

 

[
{
"@odata.etag": "",
"fullname": "Bob Smith",
"owninguser": "{\r\n \"fullname\": \"Main User\"\r\n}",
},
{
"@odata.etag": "",
"fullname": "Dave Smith",
"owninguser": "{\r\n \"fullname\": \"Main User\"\r\n}",
}, 
{
"@odata.etag": "",
"fullname": "Kelly Smith",
"owninguser": "{\r\n \"fullname\": \"Secondary User\"\r\n}",
},
{
"@odata.etag": "",
"fullname": "Danny Smith",
"owninguser": "{\r\n \"fullname\": \"Secondary User\"\r\n}",
}
]

 

Is there any other way that I can get hold of the User fullname without using a second query (as this already exists within a foreach so I can't use any more loops).

 

Thanks

 

Lee


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

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Dynamics 365 oData Query with Expanded Entities treated as Strings

Hi @LeeHarris,

 

I will try to involve others who is more fimilar with this kind of issue to have a look at it.

 

Regards,

Mona

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

Re: Dynamics 365 oData Query with Expanded Entities treated as Strings

Hi @v-monli-msft

 

Thanks, ideally if there was some way to access the linked entity data using the dynamic entities that would be perfect.

 

Lee


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

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (11,336)