Skip to main content

Notifications

Community site session details

Community site session details

Session Id : j/ENAqQNpZ1mv0AN7o0Y0D
Power Apps - Building Power Apps
Unanswered

Gallery Displays in Preview but Not When Published to Teams

Like (1) ShareShare
ReportReport
Posted on 12 Jan 2021 01:06:25 by 43

Hello Power Apps People!  I am working on an app that displays a gallery (Teams Dataverse is the data source, approx 18,000 items) and the user is able to filter the gallery with text inputs.  When I am in Power Apps in Teams and when I use it in Preview mode everything functions as it should.  However, when I publish the application to a Team the gallery is empty.   I thought maybe it was a delegation issue for I filtered for the FirstN 500 items and it still did not resolve the issue.  I also removed all of the text input filters and re-published to the Team and the gallery then displays.  Does text input filters not work when filtering a Teams Dataverse table? Has anyone encountered this and found a resolution?

  • Suggested answer
    drummerboy Profile Picture
    35 on 06 Aug 2024 at 18:46:46
    Gallery Displays in Preview but Not When Published to Teams
    Do what CU06081717-0 says but you can also do it by setting the default of the filter dropdowns to "" I believe. Play around with those settings. It's because the dropdown isn't properly setting itself up and nothing is displayed as a result. I've had that same problem and this solves it. 
  • Suggested answer
    CU06081717-0 Profile Picture
    on 06 Aug 2024 at 17:23:25
    Gallery Displays in Preview but Not When Published to Teams
    I have found a very simple solution!
     
    Create a "Text Clear" variable that runs on start. 
     
    For my solution I used 
     
    Set(varTableClear,""for the app OnStart
     
    Then I set the text input Value to my variable varTableClear
     
    When the app is published, the text input is "Reset" to nothing,
    allowing the gallery to populate.
     
    I was experiencing the issue where the preview populated the gallery,
    but the published app did not.
    This fixed the problem.
  • Suggested answer
    MarcusD1 Profile Picture
    271 on 01 Aug 2024 at 17:08:26
    Gallery Displays in Preview but Not When Published to Teams
    I just experienced this issue with the Power App I'm building. I have several filters in place:
    • filter 1 (choice field)
    • filter 2 (choice field)
    • filter 3 (start date)
    • filter 4 (end date) [and the filter can use one or both - i.e. search after the start date, search before the end date, or search between these dates]
    • filter 5 (search by word)
    • filter 6 (search by number)
    I was using Modern controls for all of these fields. Through troubleshooting, I noticed that if I simply clicked into and then out of both the search by word and search by number fields (i.e. Modern Text fields), then the gallery data would appear; I didn't even have to enter anything. So on a hunch I deleted the Modern fields and replaced the with Classic Text input fields. Voila... problem solved.
     
    YMMV.
  • Micha55 Profile Picture
    2 on 27 Jun 2024 at 09:37:16
    Re: Gallery Displays in Preview but Not When Published to Teams

    Hi,

    the problem still exists. For me the FirstN command doesn't work because I want to show all items, not just the first one.

    Hope we'll find the solution.

  • NicaraguaJones Profile Picture
    14 on 13 Jun 2024 at 08:54:52
    Re: Gallery Displays in Preview but Not When Published to Teams

    Hi Laxmi, I stopped working on this project about 8 months ago so my memory is not great... but I believe I did resolve the issue. Here is the code on the gallery items property, hope it helps (it may have been the FirstN command that did the trick, but I can't recall for sure):

     

    Sort( Search( FirstN( Filter( [@RCU_Rooms], (IsBlank(cbBuilding.Selected.Value) || Building.Building = cbBuilding.Selected.Value) && (IsBlank(cbStatus.Selected.Value) || RoomStatus = cbStatus.Selected.Value) && (IsBlank(cbFloor.Selected.Value) || Floor = cbFloor.Selected.Value) ), 500 ), RoomSearchBox.Value, cr925_room ), Room, SortOrder.Ascending )

  • Laxmibebi Profile Picture
    4 on 13 Jun 2024 at 08:38:53
    Re: Gallery Displays in Preview but Not When Published to Teams

    Hi @RachelPalya1 
    @NicaraguaJones 

    Did you guys able to resolve this issue, I am facing exactly the same issue the app is working perfectly fine in preview data is getting displayed in gallery after selecting an item from dropdown but after publishing the gallery data is not populating even after selecting an item from dropdown.

    I tried the workaround which is mentioned here of inserting some inputs in input field and removing it back the data gets visible. But what is the permanent solution for this issue. User doesn't agree to always provide input and remove it back to start working on application.

    If issue is resolved for you could you please share how can we mitigate this.

    Thanks & Regards,
    Laxmi

  • NicaraguaJones Profile Picture
    14 on 04 Apr 2023 at 13:57:00
    Re: Gallery Displays in Preview but Not When Published to Teams

    Hi Hardit - I am having the same issue as the OP here...  Gallery Items property is set to:

     

    Search(
    Filter([@RCU_Rooms], IsBlank(cbBuilding.SelectedItems.Value) || IsEmpty(cbBuilding.SelectedItems) ||
    Building.Building=cbBuilding.Selected.Value),
    RoomSearchBox.Value,"cr925_room")

     

    Where:

    • RCU_Rooms = dataverse for teams table
    • cbBuilding = combobox
    • RoomSearchBox = Text input

    So in preview mode, all entries from the RCU_Rooms are displayed in the gallery despite lack of selection on the combobox and no text entered in the search box (as is expected/desired).  Once published to Teams, the Gallery is empty opening the app and selecting a value in the combobox does nothing.  Inputting text into the search then seems to "activate" the gallery, and search by text box or combobox filtering both begin to work, and if the combobox is cleared and the searchbox is empty, all gallery items are displayed, as in the preview.

     

    Any suggestions appreciated.  Thanks!

  • Community Power Platform Member Profile Picture
    on 28 Aug 2021 at 17:22:48
    Re: Gallery Displays in Preview but Not When Published to Teams

    Hi Rachel, appreciate this has been a while but I thought it would be worth mentioning had a similar problem with Dataverse for Teams on 2 different apps.

     

    The workaround I came up with is to have the reference to the filter in the gallery 'Items' property disabled when the app loads by using an 'If' statement referencing a boolean context variable set to 'false' in 'On Visible'; then when the text filter is selected (using the 'On Select' properpty) it updates the context variable to 'true', meaning the 'Items' property now includes a reference to the text input. Seems to work although there is still a brief moment prior to the user typing when the gallery disappears - as soon as they type the gallery works as intended, however.

  • PowerAddict Profile Picture
    7,314 Most Valuable Professional on 02 Feb 2021 at 16:13:47
    Re: Gallery Displays in Preview but Not When Published to Teams

    @RachelPalya1 can you provide some more info about the gallery? Like what is its Items property? To answer your question about text input controls, they should work the same way in Dataverse for Teams. 

     

    ---
    If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

     

    Thanks!

    Hardit Bhatia

    Microsoft Business Applications MVP

    Microsoft Certified Trainer MCT

    Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 106 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard
Loading started