cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AKB_2K
Level: Powered On

Distinct value in gallery from sharepoint list

Hello All,

 

I am facing a technical roadblock in bringing only distinct values to my gallery from SharePoint list. Let me give you a brief of the problem at hand.

 

Sharepoint list "ApplicationDetails" contains following fields

  • ApplicationName - Name of the application in current environment
  • SystemType - Development or Production, etc.
  • SystemName - Alias name for e.g. development system 1 for one application is named as RSDV001, and development system 2 for same application can be called as RSDV002
  • SystemURL - URL to access this system

 

Now there are multiple SystemType values for one application like

ID

ApplicationName

SystemType

SystemName

SystemURL

1ABCDevelopmentRSDV001

http://dev1.url.com

2ABCDevelopmentRSDV002http://dev2.url.com
3ABCUATRSUD001http://uat.url.com
4ABCUATRSUD002http://uat.url2.com

 

Now I have created one GalleryApplication using Table() structure to represent ApplicationName - variable for onselect in this gallery is "_ApplicationSelection" mentioned as 

 

Set(_ApplicationSelection, ThisItem.Filter)

 

I want to create another GallerySystemType with SystemType showcasing only unique or distinct values. Values in this gallery will be filtered based on _ApplicationSelection value.  Now selection of item in GallerySystemType will showcase the system name and URL in another gallery GallerySystemDetails.

 

Roadblock: I am unable to showcase unique values in GallerySystemType. Can someone please help showcase how to get only distinct values in this gallery based on Application selection?

 

Cheers!

AK

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Distinct value in gallery from sharepoint list

Hi @AKB_2K ,

 

I think you can use a dropdown2 control to replace your first gallery:

Dropdown1.Items=Distinct(ApplicationDetails,ApplicationName)
Dropdown2.Items=Distinct(Filter(ApplicationDetails,ApplicationName=Dropdown1.Selected.Value),SystemType)

 

Then for the Items property of gallery2:

Filter(ApplicationDetails,ApplicationName=Dropdown1.Selected.Value,SystemType=Dropdown2.Selected.Value)

 

I assume that all these columns are text column type.

 

Regards,

Mona 

Community Support Team _ Mona Li
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Distinct value in gallery from sharepoint list

Hi @AKB_2K ,

 

I think you can use a dropdown2 control to replace your first gallery:

Dropdown1.Items=Distinct(ApplicationDetails,ApplicationName)
Dropdown2.Items=Distinct(Filter(ApplicationDetails,ApplicationName=Dropdown1.Selected.Value),SystemType)

 

Then for the Items property of gallery2:

Filter(ApplicationDetails,ApplicationName=Dropdown1.Selected.Value,SystemType=Dropdown2.Selected.Value)

 

I assume that all these columns are text column type.

 

Regards,

Mona 

Community Support Team _ Mona Li
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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,247)