web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

GroupBy Issue

(0) ShareShare
ReportReport
Posted on by 283

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

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @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."

  • dyee4614 Profile Picture
    283 on at

    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. 

  • mdevaney Profile Picture
    29,989 Moderator on at

    @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."

  • dyee4614 Profile Picture
    283 on at

    @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"

  • mdevaney Profile Picture
    29,989 Moderator on at

    @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."

     

  • dyee4614 Profile Picture
    283 on at

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

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @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."

  • dyee4614 Profile Picture
    283 on at

    @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!

  • mdevaney Profile Picture
    29,989 Moderator on at

    @dyee4614 

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard