cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aec2018
Microsoft
Microsoft

Accessing a nested object to display as a column in a gallery table

I have a gallery table populated by a response from a custom connector. So far, my gallery table has used the top layered properties. I want to display nested properties as columns, too. So where I normally have ThisItem.Property1 for one column, I'd like to do ThisItem.Property2.Property2A for another column. However, Property2 doesn't even show up as an option to access using dot notation, let alone Property2.Property2A. Is this at all possible or do I have to somehow create two tables and merge them (one for the top layer properties, one for the nested properties)?

 

 

{
"jsonResponse": [
{"Property1": "foo",
"Property2": {
  "Property2A": "bar",
  "Property2B": "baz"
 }
 },
 {"Property1": "foo2",
  "Property2": {
   "Property2A": "bar2",
   "Property2B": "baz2"
  }
}]
}

 

2 REPLIES 2
v-JessicaG-msft
Community Support
Community Support

Hi @aec2018 ,

 

Could you show me the settings of your Gallery data source?

 

I did a simple test with two ways of data source, one is to put the table structure you show directly into the Gallery items property, and the other creates a collection to put into items. I have tests for your reference, you could refer to the screenshot below:

vJessicaGmsft_0-1639563632855.png

vJessicaGmsft_1-1639563638538.png

 

Best Regards,

Jessica Gu

aec2018
Microsoft
Microsoft

Hi @v-JessicaG-msft ,

 

Thanks for the response. This is the Items property of my gallery. It's a collection (competeRegionMappingData) made of the response from my custom connector which returns a JSON response from our API. There is some test logic for filtering in there you can ignore:

 

aec2018_0-1639612574534.png

 

Each column here comes from ThisItem. For example, this is my Azure Billing Region column coming from ThisItem.AzureBillingRegion:

 

aec2018_1-1639612782189.png

 

One property in the response is nested and I need each nested property to become its own column. It would make sense to be able to use ThisItem.azureRegion.FriendlyName from the response:

aec2018_2-1639613237656.png

 

as the Text property of a column but azureRegion isn't even available as a property of ThisItem:

 

aec2018_3-1639613330622.png

 

I do see that your example is using dot notation to get to nested items. Am I doing something differently than you that I'm not quite seeing? Thanks.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,352)