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

Group in gallery

Hi Guys,

 

I'm new on PowerApps and i already learn a lot. This App is wonderful, but i need your help right now. Thanks in advance.

 

As you can see on my Sharepoint List (please see attachements), i have 3 lines. 2 of them has the Statut = Nouveau.

I would like to know how i can regroup them in a gallery in PowerApps. Cause for now, when i create a gallery, my gallery create a line for every "Nouveau" i have in my SharepointList. (see attachment) 

I only want two lines in my gallery : "Nouveau"and "En cours"

 

Thanks for your help

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @Dyxt,

 

It looks like Statu is a Choice type column in Sharepoint.  You can save yourself a lot of aggravation by either converting Choice columns to Single line of text or Numbers from within Sharepoint.  I have never lost data by doing this but the other way is to create a new calculated column and put the Choice column in as the calculation.  You can then use the new calculated column in Powerapps. Choice and Lookup columns are embedded tables and INHO are meant for use in SharePoint and are not designed for Powerapps.  Thats the reason for the complicated work arounds.  The screen capture on the left is from the Sharepoint Online with the list settings and  create columns clicked and the calculated type chosen. In this case, the Categories column is a Choice type.  Note the single line of text option below the type of information  section. Unfortunately, this will not work for Lookup type columns.  A different approach is necessary for unpacking them.  I hope this helps.  Capture.PNG

 

 

View solution in original post

Dyxt
Frequent Visitor

Hi ,

 

Thank you so much for your help. I succeed now.

View solution in original post

15 REPLIES 15
Srautio
Advocate I
Advocate I

If you want to be able to click on either "Nouveau" or "En cours" to see all items with that current "Statut" you will have to use a Gallery and some sort of Control to select that value.

 

 

Here's a basic setup using a Collection of three items with a Status column.

image.png

 

 

Between the first Gallery and the Dropdown is the Distinct() method I use to get all values in the column status.

Distinct(items, status).Result

Then to filter the Second Gallery I use a Filter

//For the dropdown
Filter(items, status = Dropdown.Selected).Result
//For the gallery
Filter(items, status = firstGallery.Selected).Result)

I believe this is a basic example of what you want to achieve.

Hi @Dyxt This might get you started: https://powerusers.microsoft.com/t5/Community-Video-Gallery/Creating-a-PowerApps-Leaderboard-GroupBy.... It's created a leader board using grouping and summing of rows with a SharePoint list as the source. The key is going to be to point to your SharePoint list but replace the Items property in the gallery with your proper GroupBy code. Then you can group with whatever date you wish. Hope that gets you started down the right path. 

Dyxt
Frequent Visitor

I tried what this guy do in the video but unfortunately my f(x) does not find my column in my share point list.

He find my list : Tickets , but when i type Statut it does not working.

 

Why does my powerapps not find my column "Statu"or any other column ?

 

See attachment

Sharepoint in my case has changed the name it presents back to PowerApps. you may have to try a few to see if it's masking it as a different column. For example, my column Nominated, is Nominated_x593 and another column turned from Category to L2823J for some ungodly reason. Another potential cause could be some columns in SharePoint like People Pickers are nested columns where you have to go under the column name like Person.Department to find the actual data.

 

Try to refresh your data source also just in case. 

Dyxt
Frequent Visitor

I really tried everything. If i wrtite GroupBy(Tickets       that one is ok, he find my list but if i add GroupBy(Tickets, Statut         it does not work and it does not find my column. 

 

I already tried to refresh, to start with any letters i dont have any suggestion..

I'm not too certain then. I wonder if Status (french: Statut) is a reserved word and may be giving you the problem. Out of curiousity, if you create a new column with the status data in sharepoint with a slightly different name like StatusMessage, does it work?

Dyxt
Frequent Visitor

Yes i already tried with many column : Description , Cree_par, ... I dont ahve any siggestion once i type GroupBy(Tickets, 

 

What can i do ? 

Have any idea whats wrong

Try the following on a Label Text property or anywhere else to see if you get any intellisense options:

Tickets.

If you dont get anything from that Tickets might not be the name of your connection but something else you have set in your application.

 

If you get intellisense options from that then try your group by connection with quotation marks around the column title.

GroupBy(Tickets, "Statut", "NameYouWantToGiveYourGroup")
Dyxt
Frequent Visitor

Please see attachments.

 

I really don't understand.

Since this morning , i focus on that

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,949)