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

How to display a column within a PowerApps Gallery which includes data from several SharePoint records

I have a SharePoint list with three fields in it: Project, Request and Release. What I want to do is to display the Release information for Projects showing the sorted and distinct Releases for each project as in the example below:

 

Project         Release

A100            BC20.10

                    BC20.11

                    BC21.01

B100            BC20.09

                    BC21.01

 

The SharePoint records are as follows:

Project         Request     Release

A100            001            BC20.11

A100            002            BC20.10

A100            003            BC20.01

A100            004            BC20.10

B100            001            BC20.09

B100            002            BC20.01

B100            003            BC20.09

 

Does anyone have any ideas of how to accomplish this within PowerApps? Thanks!

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @DavidG3276 ,

 

Could you tell me:

What are the data types of the three columns? Are they all ‘Single line of text’ columns?

What control do you use to display data? Is it a gallery control?

 

If my assumptions are correct, you could try the following steps:

1\ Add a gallery control and set its Items property to:

GroupBy(LIST64,"Project","Release")  // LIST64 is the name of my list

 

Insert a label control to this gallery control and set its Text property to:

ThisItem.Project

 

2\ Embed a gallery control into the gallery control and set its Items property to:

Distinct(ThisItem.Release,Release)

 

Insert a label control to this gallery control and set its Text property to:

ThisItem.Result

 

3\ The result is as follows:

v-xiaochen-msft_0-1612143981017.png

 

 

Best Regards,

Wearsky

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

View solution in original post

v-xiaochen-msft
Community Support
Community Support

Hi @DavidG3276 ,

 

Firstly, If you use the Distinct() function,Its output is the result table.

 

Secondly, If you want to sort the results, please modify the following formula.

Set the gallery control's Items property to:

SortByColumns( Distinct(ThisItem.Release,Release),"Result",Ascending)

v-xiaochen-msft_0-1612489176144.png

 

Finally, the result is as follows:

v-xiaochen-msft_1-1612489216448.png

 

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

 

View solution in original post

5 REPLIES 5
v-xiaochen-msft
Community Support
Community Support

Hi @DavidG3276 ,

 

Could you tell me:

What are the data types of the three columns? Are they all ‘Single line of text’ columns?

What control do you use to display data? Is it a gallery control?

 

If my assumptions are correct, you could try the following steps:

1\ Add a gallery control and set its Items property to:

GroupBy(LIST64,"Project","Release")  // LIST64 is the name of my list

 

Insert a label control to this gallery control and set its Text property to:

ThisItem.Project

 

2\ Embed a gallery control into the gallery control and set its Items property to:

Distinct(ThisItem.Release,Release)

 

Insert a label control to this gallery control and set its Text property to:

ThisItem.Result

 

3\ The result is as follows:

v-xiaochen-msft_0-1612143981017.png

 

 

Best Regards,

Wearsky

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

View solution in original post

DavidG3276
Frequent Visitor

I believe your assumptions are right. However, I haven't used ThisItem.Result previously and have not had much luck finding out much about it online. What does it do? Thanks for your help.

DavidG3276
Frequent Visitor

One other thing - I would like the Release to be sorted so that for A100, the releases would show in the order of BC20.01,BC20.10 and BC20.11.

v-xiaochen-msft
Community Support
Community Support

Hi @DavidG3276 ,

 

Firstly, If you use the Distinct() function,Its output is the result table.

 

Secondly, If you want to sort the results, please modify the following formula.

Set the gallery control's Items property to:

SortByColumns( Distinct(ThisItem.Release,Release),"Result",Ascending)

v-xiaochen-msft_0-1612489176144.png

 

Finally, the result is as follows:

v-xiaochen-msft_1-1612489216448.png

 

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

 

View solution in original post

Thank you so much!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,194)