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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApp Library Compo...
Power Apps
Unanswered

PowerApp Library Component with Table Custom Property

(0) ShareShare
ReportReport
Posted on by 17

I am creating a Library Component which acts as a pop up from my PowerApp Canvas Screen to show a few details based on the selected item from the Canvas Screen Gallery .

My Library Component has a Gallery (with containers) and the Items to this are set using a Custom Property which is of Type Table

Table( {
Column1: "Column1Result",
Column2: "Column2Result",

Column3: "Column3Result",

Column4: "Column4Result",

Column5: "Column5Result",
})

 

Once my Library Component is included in the Canvas App , the selected item is collected to a collection 

ClearCollect(
currentItem,
{

Column1: LookUp(Table1, ThisItem.PropertyName = 'Table2').ColumnName
Column2: LookUp(Table1, ThisItem.PropertyName = 'Table2').ColumnName,

Column3: LookUp(Table1, ThisItem.Property = 'Table2').ColumnName,

Column4: LookUp(Table1, ThisItem.Property = 'Table2').ColumnName,

Column5: LookUp(Table1, ThisItem.Property = 'Table2').ColumnName

}

)

 

And the currentItem is set as the Property to the Component

 

Unfortunately , my data is kind of mixed up and is not being set properly

 

I have enabled the Retired feature in the App settings as well

JAJ13JAK_0-1713789778770.png

 

 

Any ideas are appreciated!

 

 

Categories:
  • CL-02081848-0 Profile Picture
    on at

    Hello @JAJ13JAK

     

    Thank you for your question. I hope my response below will provide some help.

     

     

    I am assuming when you said that "Once my Library Component is included in the Canvas App, the selected item is collected to a collection", you are referring to having the ClearCollect formula in the Gallery.OnSelect property where your Gallery control is inside the canvas component definition; like this:

    clin_1-1716333317793.png

     

    If this is the case, ThisItem would be referring to the selected item in the Gallery control. Since the Gallery control Items property is bound to your canvas component CustomProperty with type

    Table( {
    Column1: "Column1Result",
    Column2: "Column2Result",

    Column3: "Column3Result",

    Column4: "Column4Result",

    Column5: "Column5Result"
    })

    The ThisItem would only have Column1, Column2, Column3, Column4, and Column5 columns. The Property and PropertyName would not be valid column references on ThisItem.

     

    In addition, LookUp(Table*, Formula [, *ReductionFormula* ] ) function expects the "Formula" in the second parameter provides a filter on the same Table as the Table provided in the first parameter. The filter is then used to apply on each record of the Table provided in the first parameter. Therefore, here in your LookUp formul, if you are trying to look up a record in Table1, the second parameter would be a filter formula that filters on Table1 columns. Assuming Table1 has PropertyName and Propert as well as ColumnName three columns, then the following LookUp function would be correct

    clin_3-1716334503503.png

    However, it would not be efficient. This is because we are doing LookUp on the same table with the same record filter multiple times. I would suggest putting the LookUp function outside the ClearCollect with a variable and then use that inside the ClearCollect like this

    clin_4-1716334786141.png

     

     

    Finally, please note that "Collection access in component scope" retired setting is not applicable to canvas component library components. It is only applicable to in-app canvas component.

  • cyclops06 Profile Picture
    17 on at

    thanks . It worked after turning off the Retired feature in the App settings 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard