Skip to main content

Notifications

Power Platform Community / Forums / Building Power Apps / Switch between Custom ...
Building Power Apps
Suggested answer

Switch between Custom Forms based on Drop down for order type

Posted on by 43
  • Suggested answer
    Nandit Profile Picture
    Nandit 348 on at
    Switch between Custom Forms based on Drop down for order type
    Hi tylerbailey1,
     
    I think you should create 3 different forms (with their own set of required fields), place them on top of each other and control their visibility based on the selected Dropdown item. 
     
    For example, if the user selects Lease Request, then only display the Lease Request form. You would write something like this in the form's visible property:
    Dropdown.Selected.Value = "Lease Request"
    Do the same for the other two forms. 
    If you have the default forms in your app, just use the SubmitForm function on a button like this:
    Switch(Dropdown.Selected.Value, "Leave Request", 
           SubmitForm(Form1),
           "Capex Request",
           SubmitForm(Form2),
           "Service Order Request",
           SubmitForm(Form3))
    If you are using Patch function, you can also customise it like this:
    Switch(Dropdown.Selected.Value, "Leave Request", 
           Patch(DataSource, Defaults(DataSource), {Leave Request Fields: Inputs}),
           "Capex Request",
           Patch(DataSource, Defaults(DataSource), {Capex Request Fields: Inputs}),
           "Service Order Request",
           Patch(DataSource, Defaults(DataSource), {Service Order Request Fields: Inputs}))
    Hope this helps.
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 140,719

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,355

Leaderboard