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

GroupBy Issue

Hi.  I'm trying to create a groupby but I don't know how to reference my data.  The data source is a sharepoint list.  My column names are words like Crew, Units, etc.  When I try to see the options, I see fields like "ajvs".  I'm sure these are the fields I want using the backend Sharepoint name but I don't know how to pick the right fields to roll up.  

 

help!.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: GroupBy Issue

@dyee4614 

Here's how to find the original column name:

 

Step #1 Open the SharePoint List Settings

 

Step#2  Select the Column you want to inspect

 

Step#3  While on the Column settings page look at the URL in your browser to find the column name.  It will be in the final parameter called field.

 

Example:

Untitled.png

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

9 REPLIES 9
Highlighted
Super User
Super User

Re: GroupBy Issue

@dyee4614 

A sample usage of GroupBy looks like this

GroupBy(CityPopulations, "Country", "Cities") 

 

The positional arguments have the meaning

GroupBy(Table, GroupByColumn1, NameOfNewGroupedColumn) 

 

So for instance if you wanted to group your results by Crew you would do it like this.  The grouped data would go in a column called MyNewColumn.  Make sure you have double-quotes around the column names.

GroupBy(
    Filter(
        'Field Manager''s App', 
        Date=DatePicker2.SelectedDate,
        Manager=FieldMan.Selected.Result
    ),
    "Crew",
    "MyNewColumn"
)

 

As for the autocomplete menu in your picture: yes those fields appear somewhere in the SharePoint List.  It contains all of the possible choices for the grouping column.

 

Link to MS Docs for GROUPBY

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Resolver I
Resolver I

Re: GroupBy Issue

Hi @mdevaney

 

Thanks for your reply.  The issue isn't using the groupby function.  The issue is I can't tell what column I'm referencing.  The groupby is grabbing some backend sharepoint name instead of the name I used.  For example, I created a column called Pack.  To use the groupby this column is "ajvs".  My question is how do I lookup the name? 

 

I am currently creating another groupby with all my columns and then putting them into a gallery and manually writing out which column goes where but there has to be a better way to do this. 

Highlighted
Super User
Super User

Re: GroupBy Issue

@dyee4614 

Is "Pack" a newly created SharePoint column?  If yes, you will have to update your datasource.  Do this by finding the datasource in the left side menu and clicking Refresh.  After this you would reference the column by simply writing "Pack" within double quotes.

 

Let me know if my suggestions work for you.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Resolver I
Resolver I

Re: GroupBy Issue

@mdevaney  no.  The system can read all my entries.  The issue is it is using a different naming convention.  Here is my sharepoint list.  The title name is commodity.  There is one entry, CARA CARA ORANAGE.  For everything but the group by, I can reference this column as commodity.  

 

BS2.PNG

However, in the group by Commodity = jw0y. 

bs3.PNG

 

 

P.S I tried just writing the column in quotes.  It doesn't work.  It has to be the "jw0y" name and not "Commodity"

Highlighted
Super User
Super User

Re: GroupBy Issue

@dyee4614 

The reason for this is because your SharePoint column was originally called jw0y (database column name) and was later changed to Commodity (plain English name).  You must always refer to a SharePoint column by its original name.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted
Resolver I
Resolver I

Re: GroupBy Issue

@mdevaney  Exactly!  How can I see the original name in Sharepoint?  

Highlighted
Super User
Super User

Re: GroupBy Issue

@dyee4614 

Here's how to find the original column name:

 

Step #1 Open the SharePoint List Settings

 

Step#2  Select the Column you want to inspect

 

Step#3  While on the Column settings page look at the URL in your browser to find the column name.  It will be in the final parameter called field.

 

Example:

Untitled.png

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Resolver I
Resolver I

Re: GroupBy Issue

@mdevaney  Sorry for the delay, thank you that answered my question and I was able to convert my data source!  Sorry, I wasn't able to the ask the question more directly the first time!

Highlighted
Super User
Super User

Re: GroupBy Issue

@dyee4614 

I'm just glad you are able to continue building your app.  Best of luck!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,308)