Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Dynamic Form with multiple SQL tables



I'm trying to create a rather complicated Leave Request process in PowerApps using an Azure SQL database.


We have several types of leave :- holiday, parental, sickness, overtime, emergency (to name a few!)


I have created my backend relational database with the common fields such as RequestID, RequestorID, ApproverID, SubmitDate etc. in a "LEAVE_REQUEST" table, then I have the From / Until dates in a "DATES" table (as some leave types allow multiple selections so will need repeating rows) and then have created seperate tables for the unique questions related to all the types of leave possible.


Is there a way to be able to create some form of dynamic form that loads the relevant questions based upon the type of leave selected and then be able to write the values into the appropriate table (i.e holiday questions to the "HOLIDAY" table and the common questions such as approver and status into the "LEAVE_REQUEST" table - and be able to see all the requests made with general information in a gallery and then when different leave requests are selected from the gallery, load the relevant leave type tables to display the details for that request?


Can I build it once (in an efficient manner), or do I need to builde seperate forms complately for each type?


Any assistance would be greatly appreciated.



Community Support
Community Support

Hi @alunhughes ,


You could try to implement different table names as the data source of Form control according to different conditions using the If function. 

About If function:




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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