cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,858)