Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Collection not populating

(0) ShareShare
ReportReport
Posted on by 273

Hello, first of all I want to apologize if what I am going to ask is very silly, but in reality it is the first time that I deal with PowerApps, I love this platform but I am still learning.

 

My problem is, I have a list of employees EmployeesDirectory and this list of calls contains information of the employees such as the day of the birthday, these fields (day, month and year) are of a single line text type.

 

I am building an application in PowerApps where I want to show the birthdays of the month, then I must filter my list by the month field called Mbirth and then order the records by day field called Dbirth, so I can show the list of people who have birthdays that month.

 

I have managed to connect the SharePoint list with the apps and the records are displayed, but reading I understand that it's better to use collections and configure the data source property of the gallery with the collection.

 

I have tried placing the code in OnVisible (Screen) and also in OnStart (App) but it doesn't work.

 

Set(varMonths, Text(Today(),"mm"));
ClearCollect(colBirthDay,Filter(EmployeesDirectory,Mbirth=varMonths));

 

But my problem is that the collection is not only not filled, even when I go into the properties I see some fields that are not the fields of my list.

 

Can anyone give me any suggestions as to what might be going on?

 

I put the code of the filter and the images of the collection.

 

Thank you very much, I hope you can help me.

  • WarrenBelz Profile Picture
    148,805 Most Valuable Professional on at
    Re: Collection not populating

    Hi @ADumith ,

    Yes - that certainly works - I use Access extensively for auditing and bulk updates, but normally when I mention Access, most users are not familiar with it.

  • ADumith Profile Picture
    273 on at
    Re: Collection not populating

    Thanks for answering,

     

    I found a more effective way, import the Excel sheet into an Access DB and then from Access export to the SharePoint list and finally it's works.

     

    Thanks for your time.

  • WarrenBelz Profile Picture
    148,805 Most Valuable Professional on at
    Re: Collection not populating

    Hi @ADumith ,

    You have imported your list initially from Excel which is (as you have discovered) not the best idea as the "original" field names are field_xx. If you want to get rid of this, make your SharePoint list with the field names you need and then "line up" the fields with your Excel sheet and paste them in (you can do about 50 at a time) from Excel in a SharePoint "Edit in Grid View" function.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • ADumith Profile Picture
    273 on at
    Re: Collection not populating

    I think I found the issue source.

    ListSettings.png

     

    Note that each field has its title.

     

    But, when the collection is created, the title of the field is not brought, but rather an ambiguous title is placed, I mean, field_1 instead of FullName, field_2 instead of EmployeeEmail, etc.

     

    How can I solve it?

     

    Thank you for your time.

     

    Thanks again for your time and support

  • WarrenBelz Profile Picture
    148,805 Most Valuable Professional on at
    Re: Collection not populating

    @ADumith ,

    I assumed SharePoint - the other user would be on this as well, so that does not explain it. What are you using (it should be fine on Chrome or Edge)

  • ADumith Profile Picture
    273 on at
    Re: Collection not populating

    Thanks for your reply.

     

    Sorry, I forgot to mention that great little detail. 😋

     

    I am working on SharePoint Online

     

    Any idea?

     

    Have a good evening

  • WarrenBelz Profile Picture
    148,805 Most Valuable Professional on at
    Re: Collection not populating

    Hi @ADumith ,

    I do not know what platform you are on, however the code should (and does on the other computer) work.

  • ADumith Profile Picture
    273 on at
    Re: Collection not populating

    Hello Sir,

    My list has 180 records.

    Mbirth is single line of text, so for this month's records have 04 instead of 4.

    However, yesterday I realized the collection problem could be solved by simply saving the app, closing PowerApps and reopening it.

    The problem I have now is with the filter, it's not working, so I exported the app and sent it to a friend to test and the app works, so it may be failing on my platform that makes the filter not works, the problem is not code, there is something that is not working well.

     

    Do you have any idea?

     

    Thank you!

  • WarrenBelz Profile Picture
    148,805 Most Valuable Professional on at
    Re: Collection not populating

    @ADumith ,

    What type of field is mBirth? Also how many items are in your list?

  • ADumith Profile Picture
    273 on at
    Re: Collection not populating

    Thank you very much for continuing to help me.

     

    I was testing your idea but it doesn't work, instead I used this one and was able to get the collection with the loaded data.

     

    At App.OnStart

    Set(varMonth, Text(Now(),"mm"));

    ClearCollect(colBirthDay, Sort(EmployeesDirectory,Mbirth,Ascending));

    I was wondering if I could add a new sorting by Dbirth?, I mean the collection being sorted by month and day, both ascending.

     

    When I apply the filter at gallery.items:
    Filter(colBirthDay,Mbirth=varMonth)

     

    It doesn't show any records, but when I remove the filter and leave just the collection name all the data is loaded.

     

    Any idea how to fix it?

     

    Thank you in advance,

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1