cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kadd
Resolver III
Resolver III

From a collection to a distinct gallery

Hello all,

 

Hope you're doing good.

 

I would need a little help on getting the correct setup for my gallery...if you don't mind  😛

 

 

I will try to explain it a simplistic way cause there are basically aother things like dropdowns to filter the values etc...

I have a SharePoint library containing document names, doc category, project name, project owner, programme and Entity.

 

I created a Powerapp and loaded all this information into a collection (colFullLib).

 

Now, I would need my screen to be split into 2 galleries : 

       * the first gallery ( called galproject) would show me the distinct values related to the project name, category programme

       * the second gallery  (called galDocs) would show me the information related to the documents corresponding to the selection in the first gallery with a button that opens the document

 

the galleries take the data from the collection colFullLib.

 

My collection contains all the information from my library,  galProject show the full list of items  and galDocs is linked to galProjects so when i select a ...project/category/programme from galProject... i get the documents information....

The problem is in galProjects i end up having duplicates of the project/category/programme and can't figure out how to have it showing distinct values from the collection.

 

PXL_20221031_105312094.jpg

 

would someone have an idea how i could solve this ?

 

I tried to GroupBy but then my fields in galProject have errors saying the values do not exist.

I tried to distinct but it only works on 1 value while i need it to be applied to 3

... i'm a bit stuck...

 

Thanks a lot for your help

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Kadd

Do you want to get group the galProject by 3 fields like ProjectName, Category, ProgramName?

 

Here is the thing, the GroupBy() function could only group by one field at a time, if you want to group by three fieds at a time in the same Gallery, I am afraid there is no direct way to achieve this in Power Apps.

 

The following is what we could achieve in Power Apps using GroupBy() function, please check for reference:

vqiaqimsft_1-1667354759891.png

 

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @Kadd

Do you want to get group the galProject by 3 fields like ProjectName, Category, ProgramName?

 

Here is the thing, the GroupBy() function could only group by one field at a time, if you want to group by three fieds at a time in the same Gallery, I am afraid there is no direct way to achieve this in Power Apps.

 

The following is what we could achieve in Power Apps using GroupBy() function, please check for reference:

vqiaqimsft_1-1667354759891.png

 

 

Best Regards,
Qi

Hi @v-qiaqi-msft 

 

sorry for the very late reply.

Yes it worked! 

 

Thanks a lot for your time!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,214)