I have created a mobile app which connects to the local datasource (Static data in your app). The name of the data source is "Table1" which contains a list of guests who attend to a show. I have added an overview screen which contains a gallary to display the list of guests. Each item of the gallery contains the name and other inoformation of the guest. I have added a toggle control to the gallery item. As soon as the user changes the toggle value, it has to update one of the column "CardPickedup" to the selected value of the toggle control for the respective item in the gallery. For this I have used Patch command as below.
Toggle1.OnChange = Patch(Table1,ThisItem,{CardPickedUp:Toggle1.Value})
Powerapps shows an error saying that "The first argument of 'Patch' should be a collection", highlighting "Table1". I tried the same function in the other screens, but always I get this error. I am not sure how to solve this.
Just for a test I added another data source which connects to a google sheet with the same data set and just changed the first argument to the new data source. This works fine and update works properly, but not working only when I connect to the local data source.
Can anyone please help?
Solved! Go to Solution.
Hi Kiran,
Please consider using Common Data Service for your app. That will allow you to have 20,000+ records and also have the data persisted as the guests register to the event. Here is a tutorial to help you get started:
https://powerapps.microsoft.com/en-us/tutorials/data-platform-intro/
Best regards,
Irina
Hi Kiranshegde,
May I know that what is it that you exactly mean by "connect to local datasource"? There is no such connection in powerapps so far. Please help to confrim this.
Regards,
Mona
Hi kiranshegde,
As I understand, the local datasource in your case is data imported from a local Excel spreadsheet. That data is static and cannot be updated through Patch. Do you need to save the data between app sessions? If so, then please use a non-static data source. If you don't need to save the data updates between app sessions, then you can copy that data into a local collection using Collect function and do Patch on that.
Best regards,
Irina
Hi Irina,
Thank you for your answer. You are correct that I imported data from an excel spreadsheet to the app. My scenario is like this.
- The app will be used by an onsite host for an event at the onsite desk.
- He gets the list of registrations through some other database as an excel.
- I imported the data to the app as local data source.
- The app user (onsite host) can see all the registrations (guests) in a list in the PA app.
- As soon as a guest arrives, he marks the guest as attended. For this he has to update the Attended column of the spreadsheet to true. I am using Patch command for this purpose.
- After the end of the event, the app user exports the data for the update of the orininal system.
I tried to achieve the same functionality by using the connection to google spreadsheet. But PA seems to support only 500 records while connecting to google spreadsheet. We have around 20,000 records for each event. What would be the best approach to handle this requirement?
Thank you
Kiran
Hi Kiran,
Please consider using Common Data Service for your app. That will allow you to have 20,000+ records and also have the data persisted as the guests register to the event. Here is a tutorial to help you get started:
https://powerapps.microsoft.com/en-us/tutorials/data-platform-intro/
Best regards,
Irina
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
53 | |
50 | |
37 | |
36 |
User | Count |
---|---|
274 | |
91 | |
86 | |
76 | |
75 |