cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KJH1138
Frequent Visitor

Reusable Component - Gallery Bug?

I have a created a reusable component that consists of a Gallery containing a Label.

 

Summary

Component:  MyComponent;

Custom Input Variable: MyTable <Table({Object:"Object1",ObjectParent:"ObjectParent1"})>

Gallery: MyGallery (Items set to MyComponent.MyTable)

Label (in Gallery): (Text set to ThisItem.Object)

 

When I import the Component into my App and set the 'MyTable' attribute to 'AppTable' (corrected formatted Collection)I would expect to see the Labels in the Gallery displaying the 'Object' values from the input table.  Instead, the Labels display the 'ObjectParent' values instead.

 

The input table is correctly configured (column headers aren't swapped) and I am able to filter using the 'ObjectParent' column.

 

What is very odd is that if I change the MyTable attribute from 'AppTable' to 'AppTable.Object' the Gallery Labels will then display the 'Object' column variables.

 

Am I missing something or this a bug?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Thanks for trying to replicate my issue,

 

I find it very odd as well. I'm going to play with it some more when I get a moment.  One difference  between your example above and my own is that the table I am using as an input is actually a reshaped SharePoint List :

 

RenameColumns(ShowColumns(EAMOrganization,"Organization","Parent"),"Organization","Object","Parent","ObjectParent")

 

I don't think this is a relevant difference, but a difference nonetheless.  I'd also note that this behaviour isn't consistent as I can add a second instance of the component to the app and it works exactly as expected.

 

 

View solution in original post

Hi @KJH1138 ,

I've made a similar test just like yours but still not met any problem like your description.

However, I found an interesting things: when you create collection with Parent field name, it will have error.

So I replace Parent with 'Parent' to resolve this problem.

Here's my test for your reference:

1)the formula to create the collection:

ClearCollect(EAMOrganization,{Organization:"Object1",'Parent':"ObjectParent1"})

2)set component's mytable to :

RenameColumns(ShowColumns(EAMOrganization,"Organization","Parent"),"Organization","Object","Parent","ObjectParent")

 Then the label in the gallery will display correctly.

4294.PNG

 

 

If your problem still exists, I suggest you open a ticket:

https://powerapps.microsoft.com/en-us/support/

I've tried my best to follow your steps but could not have the same error that you met.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yutliu-msft
Community Support
Community Support

Hi @KJH1138,

That is really strange...

I've made a similar test but not met the same problem like you description.

Here's my test for your reference:

1)I create a component like this:

a custom property:

4271.PNG

 Inside this component, set MyTable property:

Table({Object:"Object1",ObjectParent:"ObjectParent1"})

4272.PNG

 Insert two galleries in this component.

Set gallery1's Items:

MyComponent.MyTable

inside gallery1, insert two labels, one's Text is ThisItem.Object, another's Text is: ThisItem.ObjectParent

Set gallery2's Items:

 

MyComponent.MyTable.Object

 

inside gallery2, insert a label,  Text is ThisItem.Object

 

2)insert this component in your app, my labels in two galleries could both display object field correctly

4273.PNG

 

3)export this component, import this component to another app

these two galleries could also display correctly.

4274.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for trying to replicate my issue,

 

I find it very odd as well. I'm going to play with it some more when I get a moment.  One difference  between your example above and my own is that the table I am using as an input is actually a reshaped SharePoint List :

 

RenameColumns(ShowColumns(EAMOrganization,"Organization","Parent"),"Organization","Object","Parent","ObjectParent")

 

I don't think this is a relevant difference, but a difference nonetheless.  I'd also note that this behaviour isn't consistent as I can add a second instance of the component to the app and it works exactly as expected.

 

 

View solution in original post

Hi @KJH1138 ,

I've made a similar test just like yours but still not met any problem like your description.

However, I found an interesting things: when you create collection with Parent field name, it will have error.

So I replace Parent with 'Parent' to resolve this problem.

Here's my test for your reference:

1)the formula to create the collection:

ClearCollect(EAMOrganization,{Organization:"Object1",'Parent':"ObjectParent1"})

2)set component's mytable to :

RenameColumns(ShowColumns(EAMOrganization,"Organization","Parent"),"Organization","Object","Parent","ObjectParent")

 Then the label in the gallery will display correctly.

4294.PNG

 

 

If your problem still exists, I suggest you open a ticket:

https://powerapps.microsoft.com/en-us/support/

I've tried my best to follow your steps but could not have the same error that you met.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,345)