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

Dynamic Form with multiple SQL tables

Hi,

 

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.

 

Thanks

1 REPLY 1
Community Support Team
Community Support Team

Re: Dynamic Form with multiple SQL tables

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:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Regards,

Mona

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

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,796)