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 with starting ...
Power Apps
Unanswered

problem with starting the app

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hello,

 

when I start the app as a regular user the gallery it won't show any data but when I go to the Edit page it shows 

 

 the app version is the latest and I don't know why 

 

I provided screenshots one is for the start the app and the other one in the Edit application mode 

Play.PNG
Edit.PNG
Categories:
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    a.jpg

    Make sure it's not like this.

     

    Also post your gallery item code and your App.OnStart code

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I checked and the last version is the live version.

     

    and I post the code in the App.OnStart and the result is the same, I forgot to mention that I have roles for different users and only one role is not working in the play, the other roles is working perfectly  

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    What i meant was share your app.onstart and gallery item code here.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    oh ok,

    App.OnStart code:

    Set(var2, Office365Users.MyProfileV2().mail);
    Set(var1, LookUp('App Users', User.Email=var2));
    Set(varRole, var1.Role.Value);

    Switch(
    varRole,
    "SA",
    Set(
    varList,
    Filter(
    'Invoice()',
    Creator.DisplayName = User().FullName
    )
    ),
    "AR",
    Set(
    varList,
    Filter(
    'Invoice()',
    'Assign to:Email'.Value = Office365Users.MyProfileV2().mail
    )
    ),
    "Translator",
    Set(
    varList,
    Filter(
    'Invoice()',
    'Translation Status'.Value = "Needs translation" || 'Translation Status'.Value = "Translated"
    )
    ),
    "Manager",
    Set(
    varList,
    Filter(
    'Invoice()',
    'Invoice Status'<> "Invoice Paid"
    )
    ),
    Set(
    varList,
    'Invoice()'
    )
    );

    this is to get what is the user's Role and set the table for the gallery  

     

    Gallery item code :

     //For Sorting button
    SortByColumns(
    // Search Bar
    Search(
    Filter(
    varList,
    IsBlank(cbName.SelectedItems.'Customer Name') || IsEmpty(cbName.SelectedItems.'Customer Name') || 'Customer Name' in cbName.SelectedItems,
    IsBlank(cbMaster.SelectedItems.'Master Project') || IsEmpty(cbMaster.SelectedItems.'Master Project') || 'Master Project' in cbMaster.SelectedItems,
    IsBlank(cbStatus.SelectedItems) || IsEmpty(cbStatus.SelectedItems) || 'Invoice Status' in cbStatus.SelectedItems,
    IsBlank(cbGroup.SelectedItems.Value) || IsEmpty(cbGroup.SelectedItems.Value) || 'Customer Group' in cbGroup.SelectedItems
    ),
    TextSearchBox.Text,
    "InvoiceNumber"
    ),
    "BillingDate",
    varSort
    );

    this gallery have filter, search, and sorting

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Set(var2, Office365Users.MyProfileV2().mail);
    Set(var1, LookUp('App Users', User.Email=var2));

     

    MyProfileV2().mail and User.Email are the same thing. To get the role you need Email column from list 'App Users'.

    For eg.

    Set(varRole,LookUp('App User',Lower(EmailColumn) = Lower(User.Email)).Role)

    the above line will add the role into variable. and only the role nothing else. Then you can use that variable in Switch statement.

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 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard