cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
f_yang
Regular Visitor

Power Apps data feeding/loading problem

I'm a beginner of power apps. I have a simple power app with two screens developed. One is browsing the titles with a filter and search box, the other is the detail of each record. The app was running with a count of list shown and the details screen navigated. I then followed the steps to publish, and upload it to my Teams. It used to work.

I just changed a bit two days ago with some a filter feature. The testing is good. After I published, and upload it to my Teams, the data was gone. I checked the app in the online studio, and found the data was disappeared. It's so frustrating that I spent two days to troubleshoot this. I did check my Items property on my gallery, screen, and PowerBI integration. I can't see where the trick is. When I re-open the app, it still doesn't have any data.

Could you help me please? 

I really want to understand how Power Apps data source connection comes from, and how the data is synchronized with backend data source. 

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @f_yang ,

 

Can you then please mark the solution for the benefit of the community?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

7 REPLIES 7
BCBuizer
Super User
Super User

Hi @f_yang,

 

The data is typically not stored in the app. The only scenarions where this is not the case, is when an Excel table is imported, or when you hard-code it. Even then, the data is read-only.

 

In the below article you can find more information on working data sources:

 

https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-data-sources



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Thank you very much for your quick response. 

I found the issue is:

I have a button that is used to add a value into a Choices (Dropdown box) on top of existing status values. I need to click it in Run mode to enable the new value. Then all the choices can be shown up. I then use colChoices that is saved in the Collections. I guess colChoices is a variable that can't be permanently stored. I now have to allways click the button to enable the dropdown list. Button.PNGcolChoices.PNGDropdown.PNG

The view what I want it is: list.PNG

I also don't understand the steps to add the power app into Teams.

I tried different ways, and found these steps work, but not understand what exactly it means. Do you have a link to explain this? 

1. Save as a file from File menu. 

2. Leave the studio and Publish it.

3. Export as a  zip package from Power apps website and save it locally. 

4. Import the zip package from Power apps website.  

5. Now the power app seems completely ready for Teams adding.

 

I don't understand why the power apps are managed in this way, import and export and overwrite the app. 

 

Thank you so much for your help.

 

BCBuizer
Super User
Super User

Hi @f_yang ,

 

For you first point, where you are saying you always have to press a button to add "All" to a collection of choices:

 

Indeed you are right to say that collections are not persistent unless you save them to your data source. In your scenario you had to hard code another value into the table for which you have found the correct code.

 

However, you don't need user intervention for this (e.i. user clicking a button): There's an app level property, called OnStart which allows you to execute code when the app starts. If you add your code there, it will automatically trigger and your dropdown will have the desired choices without user intervention.

 

You can set the App.OnStart property by clicking App in the tree view and then selecting the OnStart property:

 

BCBuizer_0-1660893126180.png

 

For your second question please open a new topic so it will be easier for other member of the community to find the answers to their question. Please feel free to tag me.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

OnStart does work. Thank you so much!

BCBuizer
Super User
Super User

Hi @f_yang ,

 

Can you then please mark the solution for the benefit of the community?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,838)