cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
CallumTR90
Level: Powered On

Can a user choose a Google Sheet to patch to?

Hi there, 

 

I've used the following formula on a button to patch a set of running results to a Google sheet spreadsheet: 

 

ForAll(
TheResults,
Patch(
Sheet3,
Defaults(Sheet3),
{
Runner: Runner,
Handicap: Handicap,
Finish_x0020_Time: Finish_x0020_Time,
Finish_x0020_Position: Text(Label5)
}
)
)

 

However, I need the user to be able to save a different set of results on a new google sheet each week from PowerApps. Is there a way the user can select a sheet to patch to? eg:

 

ForAll(
TheResults,
Patch(
User chooses Google sheet,
Defaults(User chooses Google sheet),
{
Runner: Runner,
Handicap: Handicap,
Finish_x0020_Time: Finish_x0020_Time,
Finish_x0020_Position: Text(Label5)
}
)
)

 

Or is there a completely different way of doing this other than patching? 

 

Any help would be greatly appreciated. 

 

Thanks,

Callum

7 REPLIES 7
Community Support Team
Community Support Team

Re: Can a user choose a Google Sheet to patch to?

Hi @CallumTR90,

Could you please share a bit more about your scenario?

Do these Google sheets have same data structure?

Do you want the user to be able to choose a Google sheet manually as a data source within your Patch formula?

Currently, when using Patch function to submit your data to your data source (Google sheet), you must provide a specific Google sheet table as a data source (you could not choose a data source dynamically).

If you want the user to be able to choose a Google sheet manually as a data source within your Patch formula, 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 submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CallumTR90
Level: Powered On

Re: Can a user choose a Google Sheet to patch to?

Hi @v-xida-msft, Thanks for getting back to me on this. I'm creating an app for a weekly running race my company puts on which shows all the people who are running that week and then their results after the race. I would like the user to enter their results into the app then save these to a new Google/Excel sheet in order to record these results each week. This is the bit I'm struggling with. These sheets have the exact same data structure each week. I hope this makes sense. Thanks, Callum
Anonymous
Not applicable

Re: Can a user choose a Google Sheet to patch to?

Maybe Switch Function?

 

I would put a radio button with 1 or 2, then the useris able to selected with database wants to patch based on the radio value...

 

Switch(radio.selected.value, 1 , patch on a DB, 2 , patch on another database..

 

you can achiev it with IF also, but not so clean formula thought

 

 

 

Super User
Super User

Re: Can a user choose a Google Sheet to patch to?

I don't understand the need for a new datasource. Use the same one and add a field archived. Filter out the records not archived.
CallumTR90
Level: Powered On

Re: Can a user choose a Google Sheet to patch to?

Hi @Drrickryp,

 

Thanks for your response. 

Are you able to explain a bit more what you mean by archiving here? 

Sorry, I'm new to PowerApps but this solution sounds interesting.

Thanks,
Callum

CallumTR90
Level: Powered On

Re: Can a user choose a Google Sheet to patch to?

Hi @Anonymous, 

 

This could definitely work, I hadn't thought about doing it this way. 

 

Thanks for your suggestion. I'll give this a try and let you know the outcome. 

 

Thanks,

Callum

Administrator
Administrator

Re: Can a user choose a Google Sheet to patch to?

Hi @CallumTR90 I'm glad to see you're receiving some support in this thread. Were you able to solve your issue?

 

@TopShelf-MSFT

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 51 members 4,337 guests
Recent signins:
Please welcome our newest community members: