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 / Problem building colle...
Power Apps
Answered

Problem building collection after defining variable in startup

(0) ShareShare
ReportReport
Posted on by

Hi i am having an issue with defining a collection after building objects in startup

 

i think this is a syntax issue but i may be out my depth..

 

in my app OnStart

 

i populate these objects using the connectors

 

Set(
varUser,
{
myProfile: Office365Users.MyProfileV2(),
directReports: Office365Users.DirectReportsV2(User().Email),
myManager: Office365Users.ManagerV2(User().Email)
}
)

 

and i want to add a collection to this aswell to populate my browse gallery navigation.

 

ClearCollect( NaviItems, Table( { Label: "All Leave", Screen: AllLeave }, { Label: "MyLeave", Screen: MyLeave}, { Label: "Today", Screen: TodayLeave} ) )

 

every time i try to add this it fails any ideas?

 

Regards

 

Neil.

 

 

 

 

ONSTART.PNG
Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @N0rPa 

    Do you see any errors in the app checker?  If yes, please share the error message.

     

    Make sure to put a semi-colon at the end of your SET function to tell Power Apps its an end-of-line.

     

    Set(
     varUser,
     {
     myProfile: Office365Users.MyProfileV2(),
     directReports: Office365Users.DirectReportsV2(User().Email),
     myManager: Office365Users.ManagerV2(User().Email)
     }
    );
    
    ClearCollect( NaviItems, Table( { Label: "All Leave", Screen: AllLeave }, { Label: "MyLeave", Screen: MyLeave}, { Label: "Today", Screen: TodayLeave} ) )

     

     

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

  • VineetBhasin Profile Picture
    20 on at

    Syntax seems to be correct. Please ensure that all screens exists. In the attached file only 'AllLeave' screen is visible.

     

    You can click on 'App Checker' to view error detail.

     

  • N0rPa Profile Picture
    on at

    Thanks perfect.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard