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 / Dynamic assignment of ...
Power Apps
Unanswered

Dynamic assignment of gallery items (custom component accordion)

(0) ShareShare
ReportReport
Posted on by 235

Hello,

I am building a component that creates the function of an accordion. The accordion itself works. It consists of two galleries and is structured as follows:

gal_Accordion
 ico_Accordion_OpenClose
 lbl_Accordion_Category
 gal_Accordion_Content
 ico_Accordion_Content_Next
 shp_Accordion_Content_Next
 lbl_Accordion_Content_Header
 lbl_Accordion_Content_Main

The data source for the Accordion is a table, e.g.:

Table(
 {
 Id: 1
 Text: "Chapter 1"
 },
 {
 Id: 2
 Text: "Chapter 2"
 },
 {
 Id: 3
 Text: "Chapter 3"
 }
)

With this I create 3 sections in the outer gallery, Chapter 1, 2 and 3. The content of the inner gallery is now filtered and displayed based on the selected chapter. The individual sections expand and collapse when clicked. This all works on a normal screen.

 

The challenge now is to convert the whole thing into a component that can be fed with any table as a source.

 

The content of "lbl_Accordion_Content_Header" consists of "ThisItem.Header", for example.

 

But if I don't know how my source is structured (does it even have a "Header" column), then I can't make this assignment in the component either.

 

Question: How can I design the component so that it is possible to define (e.g. via the custom properties of the component) what is displayed from the source, e.g. in "lbl_Accordion_Content_Header" or "lbl_Accordion_Content_Main"?

 

Does anyone have a tip for me? Many thanks for the support.

 

Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 538

#2
WarrenBelz Profile Picture

WarrenBelz 420 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard