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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection as Gallery ...
Power Apps
Unanswered

Collection as Gallery Items.

(0) ShareShare
ReportReport
Posted on by 9

Hi,

I am newbie to Power Apps. I am working on app for which data source is Power BI report. My use case is, On Power App I wanted to users to see the data that has come from Power BI, edit if required or create a new record and write the data to share point Excel.

I am facing issue with basic things. I am adding Power BI data to Collection on App-->On start. on Gallery I am using this collection to display data by filtering based on one drop down.

When I try to use this method, my gallery is not showing any items. However when I add the Power BI data to collection at Main Screen-->On Visible its working.  I do not want to add the data set to Collection at Main screen as this will duplicate the data when I return from other screen. Any suggestions why adding collections at App-->On start is not showing gallery?

 

Here is my code.. On App start , 

ClearCollect(Itemstoshow,[@PowerBIIntegration].Data);

 

On Gallery Items: Filter(Itemstoshow,Region=RegionSel.SelectedText.Result)

Categories:
I have the same question (0)
  • KrishnaV Profile Picture
    5,023 on at

    Hi @narengc ,

     

    In Power Apps you need to set the data on the screen or you should set it to a collection onStart of the App and set to a gallery in the screen. if you see any issues with the filter on the screen see the below tips or approach to get the required results:

    Filter query.png


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • narengc Profile Picture
    9 on at

    Hi Krishna,

     

    Thank you for the reply. I have set my data to collection on App start and filtering the data on my Gallery Items. For some reason this is not working I mean no data is showing on Gallery however when I set the my data to collection on Screen it is showing the data on my Gallery. Not sure what I am doing wrong.

     

    I cant load the data in to collection on Screen because when I navigate from different screens collection is duplicating my data as loading data to collection will be called. Hope I have conveyed the issue properly.

     

     

     

  • KrishnaV Profile Picture
    5,023 on at

    Hi @narengc ,

     

    Try changing the filter as below: 

    Items: Filter(Itemstoshow,Region.Value=RegionSel.SelectedText.Result)

     
    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @narengc ,

     

    If the app.onstart property doesn't work, here is an alternative workaround. Add a condition in Screen.OnVisible property to generate the collection.

    1. Set the Screen.OnVisible:

    If(VarNum<>0, ClearCollect(Itemstoshow,[@PowerBIIntegration].Data))

     

    2. append Set(VarNum,0) code to the Navigate function in NavigateButton.OnSelect property

    Navigate(Screen2);Set(VarNum,0)

    Then the collection will only be generated once.

    Hope this helps.

    Sik

  • narengc Profile Picture
    9 on at

    Hi,

     

    This workaround has solved my problem. Just curious why on App start we cant load the data to Collectons.

    Anyways, Thanks a lot for your 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard