cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abcdefghii
New Member

Dynamically change form based upon Excel table chosen

I am beginning to look into using Power Apps to automate a number of functions, at a top level, the user will complete a form, submit the form which will then populate a table in SQL, a stored procedure runs, before finally either a pass of fail message is sent to the user. 

 

Currently, we have a number of Excel spreadsheets that are manually imported to SQL. If I understand correctly, I can combine those Excel spreadsheets to a single Excel document and for each type of request, set it up as a table within a sheet in Excel. Those tables then become my datasource for the Power App form.  Assuming I am correct so far, is Power Apps able to dynamically change the form based upon the table selected?  Is it possible even to have the form choose a table? Or, do I need to set it up in a way similar to a subform within MS Access? I have a table with all of my request types:

 

Request 1

Request 2

Request 3

 

I create a form with the datasource as the "RequestType" table, the user, via dropdown on the form, picks one of those requests, then a secondary form populates with the fields required for that form? 

 

Edit: OK, so watched a couple videos and I am not even sure that this is the best way to go around this. It seems that using Excel as the data source is for reading and writing to Excel. I simply want to use Excel to generate a form (the fields on that form determined by a selection), the user then completes the form, the data entered then does not go to Excel, but instead goes to an SQL table, the destination table also being determined by that first choice that generated the form fields.

 

Sorry for many questions, as I said, I am very much new to PowerApps and reading a lot of information. 

 

Thanks.

3 REPLIES 3
BCLS776
Super User
Super User

I'll try to help with some of your questions:

  1. Power Apps cannot dynamically connect to a datasource (such as an Excel table) at runtime. The connection needs to be created by the app maker, so that Power Apps can validate the schema and reference it correctly in others parts of your app. You can, however, connect many Excel tables to a single app, and use logic within the app (such as the Visible property) to control which is shown to the user at a given time.
  2. Excel tables are the slowest and least-capable data source available to Power Apps. If at all possible for your workflow, import your info into a SharePoint List or Dataverse table for much better results.
  3. Do use form controls with your data sources. They offer a lot of pre-built functionality that comes in handy as your app becomes more complex and/or needs maintenance in the future.

Welcome, and hope that helps,

Bryan

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.
abcdefghii
New Member

Thank you, would setting up my tables in SQL instead of Excel be a better option as well? Essentially the same thing, but the selection (and associated fields) come from my destination SQL tables instead. 

BCLS776
Super User
Super User

Yes, SQL tables are a great choice for data sources.

 

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,922)