Currently I have a button in my application that reads all of the output values from my "Settings" pop up. It then patches. This can be time consuming if I ever need to change the button.
I'm working on writing a new output property that can loop and patch. Not sure if it will work.
Hi
It's 2022 and the capability is not yet available.
The workaround though is to create a process in Power Automate that does the saving of the the record. I was concerned about performance but that does not seem to be an issue. Hope it helps.
Best regards
Appreciate the input, but the challenge here was not the save code itself, but trying to centralize patch code in a component so it can be used in different screens. This is not really possible, and now that I have some more experience with and knowledge of the platform, I doubt something like this will be implemented within components because of the technical implications this has.
Have you tried using a hidden timer control that you can trigger by a variable? A form is another option, especially if data is being submitted. You can use the OnReset for some values. I use these two solutions in my apps for reused code quite frequently.
If I were you I would skip the component altogether and just use the new Select() function!
Edit: At the time I did not realize that the Select() function had such a serious limitation as you cannot select something on a different screen. Making my solution pretty much useless! In an actual answer to this issue, I've used collections made onstart as the datasource for components with great success. If you have less than 2000 records, you can make a perfect copy of a datasource very easily with something like ClearCollect(CollectedDataSource, DataSource)
Seems like nobody has a hack, so I'll just mark your reply as 'answer'. Thanks for thinking with me.
Idea post I made for reference and great justice:
Yes, ideally I want the Patch command to the datasource to be executed from the component. As I described in the scenario, this would allow me to use the component in every screen to send buffered data once the connection is online. As opposed to duplicate this code everywhere.
Admittedly, trying to centralize my buffer saving code in a component is already a bit of a hack, because there is no way of doing so in some kind of background process.
I know it is currently a limitation (I included a link to the relevant documentation earlier, but a bot marked that post as spam), that's why I was wondering if someone would have thought some kind of clever way to work around this.
I'll post this to the ideas section too, but I won't get my hopes up 😅.
Hi @MrNappa ,
Do you want to execute the Patch formula within your Component control?
Do you want the data source could be recognized within your Component control?
It is an known limit with Component control in PowerApps. The data source you added in your app could not be recognized within the Component control.
If you want to execute the Patch formula within your Component control, I afraid that there is no way to achieve your needs in PowerApps currently.
If you would like this feature to be added in PowerApps, please consider submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
Best regards,
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional