cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
markj21
New Member

Components Library Gallery and Updating Fields

Dear community, 

 

I hope I could ask you for some help when it comes to building a Gallery inside a Components Library. 

As part of the component I have a gallery with two labels. The labels have ThisItem.Id and ThisItem.Label. 

 

Is there a way to create an input property to let the users specify what data they want to display in these labels, especially if it comes from SharePoint or other sources? When you create a standard Gallery, you can then edit fields to let users decide what they want to be displayed in each label. I want to have a similar functionality for my library that comes as part of the component, but it does not seem to work. 


Any help will be much appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @markj21 ,

 

According to your description, I've made a test for your reference:

 

1\ This is my list ‘LIST83’. ‘Aktiivinen’ is a ‘Single line of text’ column.

v-xiaochen-msft_0-1614581090271.png

 

 

2\ Create a component.

Create 2 input property like the picture:

v-xiaochen-msft_1-1614581090279.png

 

v-xiaochen-msft_2-1614581090282.png

 

 

3\ Set input property ‘TestItems’ to:

Table({Title:"a",Aktiivinen:"a"})

 

4\ Insert a gallery control into the component and set its Items property to:

Component1.TestItems

 

5\ Insert a label control into the gallery control and set its Text property to:

If(Component1.Thevar="Title",ThisItem.Title,Component1.Thevar="Aktiivinen",ThisItem.Aktiivinen)

 

6\ Add a dropdown control ‘Dropdown1’ to screen1 and set its Items property to:

["Title","Aktiivinen"]

 

7\ Add a component ‘Component1_1’ to screen1 and set its ‘Thevar’ input property to:

Dropdown1.Selected.Value

 

8\ Set ‘Component1_1’ ‘s ‘TestItems’ input property to:

LIST83

 

9\ The result is as follows:

 AAA.gif


Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @markj21 ,

 

According to your description, I've made a test for your reference:

 

1\ This is my list ‘LIST83’. ‘Aktiivinen’ is a ‘Single line of text’ column.

v-xiaochen-msft_0-1614581090271.png

 

 

2\ Create a component.

Create 2 input property like the picture:

v-xiaochen-msft_1-1614581090279.png

 

v-xiaochen-msft_2-1614581090282.png

 

 

3\ Set input property ‘TestItems’ to:

Table({Title:"a",Aktiivinen:"a"})

 

4\ Insert a gallery control into the component and set its Items property to:

Component1.TestItems

 

5\ Insert a label control into the gallery control and set its Text property to:

If(Component1.Thevar="Title",ThisItem.Title,Component1.Thevar="Aktiivinen",ThisItem.Aktiivinen)

 

6\ Add a dropdown control ‘Dropdown1’ to screen1 and set its Items property to:

["Title","Aktiivinen"]

 

7\ Add a component ‘Component1_1’ to screen1 and set its ‘Thevar’ input property to:

Dropdown1.Selected.Value

 

8\ Set ‘Component1_1’ ‘s ‘TestItems’ input property to:

LIST83

 

9\ The result is as follows:

 AAA.gif


Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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