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 / Some labels in Gallery...
Power Apps
Answered

Some labels in Gallery don't show up

(0) ShareShare
ReportReport
Posted on by 20

Hey everyone,

 

this is the weirdest thing that happened in powerapps for me so far.


I have a SQL-Server datasource and put it in a collection like this (in "onStart" of the App): ClearCollect(myCollection, GroupBy('[myDatasource]', "BookingID", "CustomerID", "CustomerName", "Date", "Details"))

 

Now I got a gallery that is connected to "myCollection". In the gallery I have labels for "BookingID", "CustomerID", "CustomerName", "Date" and populate them with ThisItem.BookingID, ThisItem.CustomerID, etc...

 

Everything seems to work fine here. Once I run OnStart the fields get filled up with the Data.

 

The issue arises when I save +  publish the App and try to run it from the PowerApps Windows Store Application or from my list of apps on make.powerapps.com:  The App loads, but the only labels that actually show the Data are the labels with ThisItem.BookingID and ThisItem.Date. The others are just blank for whatever reason. It seems like the collection never gets those values which is weird, because when I'm working on the App everything works fine...

 

Trying to figure out how to fix this is quite difficult since the problem doesn't exist while working on the app.

 

Does anyone have an idea what the issue could be or why I get different results depending on where I run the app? 

 

Thanks.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Khar 

    Yes, very frustrating when everything works in the Designer but not during Play! Smiley Frustrated

    Here are a couple of steps that I would take to troubleshoot:

    1)  Skip the collection - Put your formula directly on the Gallery Items property:

    GroupBy('[myDatasource]', "BookingID", "CustomerID", "CustomerName", "Date", "Details")

    See if that is any different.

     

    2) Put a test label on the screen and set the Text property to:

    First('[myDatasource]').CustomerID

    See if there is a value displayed in the label at Play time.

     

    3) Consider refining your GroupBy.  It seems that you are Grouping on BookingID and Customer - yet, you are actually grouping on CustomerID and CustomerName.  Ultimately, the columns you group by will be distinct values from the datasource.  It would seem that CustomerName and CustomerID would be unique and tied together, so consider perhaps this formula instead:

    GroupBy('[myDatasource]', "BookingID", "CustomerID", "Date", "Details")

    And even then, possibly consider dropping the other level of grouping on the Date and handling that within your app differently.

     

    Just some thoughts....I hope it is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Maybe there is an access restriction on some of the tables within your database. Had that issue a few times with different sharepoint list where some data did not display due to certian access restrictions.

  • Khar Profile Picture
    20 on at

    Thank you for the suggestions.

    1) I originally did it without the collection and it used to work. The collection was just a way of trying something different and comparing the performance while using different actions.

    However, when I change it back now, it still doesn't work.

     

    2) The label works and shows the correct value. Interestingly enough the labels in the gallery now also work.

     

    3) So far, changing up the GroupBy() the way you suggested didn't change the outcome.

     

    I'll see if I can figure something out based on this, thank you.

    Edit: I changed it to GroupBy("BookingID", "Date", "Details") now and I'm using CustomerID and Customer through a second gallery inside my main gallery which seems to work fine. I'll probably end up changing up a couple more things and taking a different approach to the problem so I suppose I could close this topic since I will probably populate the labels in a different way than I originally thought.

     

    That being said I'm still wondering what the reason for the issue I experienced is.

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Khar 

    Sometimes PowerApps exhibits some strange behaviour.  Many times it boils down to some way that things were put together.  The real unfortunate part is that some of those times the problem only surfaces at Play-time, not at Design-time...those are the worse.

    The only course of action is to tear down parts of your app into separate sections or into separate apps in order to try and diagnose the real cause.

    I feel your pain!

  • Khar Profile Picture
    20 on at

    I see, thanks for the info! I'm accepting this as a solution for the time being. If I happen to find out something worth sharing I will add it later.

     

    Thanks for the assistance!

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard