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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating a Collection
Power Apps
Answered

Creating a Collection

(0) ShareShare
ReportReport
Posted on by 782

I have been working on creating a couple of collections and displaying a certain amount of records, but it seems hit or miss when I have records or have no records. My current statement, which is very basic is returning nothing. This is what I have:

 

ClearCollect(MyCollection, Office365Groups.ListGroupMembers("MySecurityGroupGUID").value);

 

I enter a valid GUID for my security group in place of "MySecurityGroupGUID", which has worked, but currently is returning no records. I have this statement OnStart of my app. I am new to Power Apps, so I am guessing that I am probably missing something obvious, but I am just not seeing it. Any thoughts on why it is not returning any records?

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    If you are working and testing within the PowerApps Studio, the OnStart property may not run correctly every time. To troubleshoot, pop your code into the OnSelect of a button temporarily to make sure it can run all the time when you want.

  • Greg27 Profile Picture
    782 on at

    I just created a button and OnSelect of the button, I copied the same code and it is not displaying anything in my ComboBox. However, If I click on View and Collections, I am now seeing data. How are we supposed to develop apps if the environment we are developing in doesn't work consistently? I believe I am working in Power Apps Studio as my URL is ...powerapps.com/studio/. Is there a better way to do this?

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    To get your combobox working, trying accessing a column of the record, such as collection.displayName.

     

    As for the environment, it's doing what it is supposed to do. The app is already "running" when we are working within it, so the OnStart event is usually in the past. On a clean start, OnStart code will run - It is simply something to be aware of. Using the OnVisible event for particular screens can be handy as you navigate between them.

  • Greg27 Profile Picture
    782 on at

    The app is running when we are in Power App Studio, editing the app? 😞  I guess knowing it is half the battle. Thanks so much for the help!!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard