web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change the form based ...
Power Apps
Unanswered

Change the form based on new mode

(0) ShareShare
ReportReport
Posted on by

Hi team,

 

I have some urgent requirement. I have a form which is connected to a data source and also gets depended on gallery item selected. There are three mode followed at initial stage when an item is selected the data related to it is displayed on form in view mode. We have a edit icon when Icon is click Form changes to edit mode and any changes done by the user is updated. 

Now we have a plus button where when user clicks on it form changes to new mode.

 

In new mode I need all the fields as a dropdown instead of text box. how can we achieve it. 

Thanks in advanced 

 

Soumiya

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    My advice would be for you to have 2 Forms. One in "New Mode" and the other on Edit Mode. 
    After that you must have a var that sees if the Form is Edit or New Mode. If it is Edit, show EditForm and hide NewForm.

    To use Combobox instead of textinput, if it not a problem with the datasource, just change the fields. If it gives you problems add the combobox and in the textinputs write:

     

    Comboox.Selected.Value


    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website! 

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Nogueira1306 

    Hey thanks for your suggestions.

    we don't use two form only we are changing the mode of the form based on selected option. 

  • Rutu1455 Profile Picture
    34 on at

    hello @Anonymous 

    when you change the mode you can set variable on it

    and you can change all the controls to dropdown 

    on dropdown display mode you can set the variable as true so

    that whenever you change the mode the variable will get called and it will show you dropdown

     

    I hope this will help you

    Like my reply if its solve your problem,

    Thank you in advance!!

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Rutu1455 ,

    This option seems to be better, But when the form mode is in view mode the data which is being selected from gallery should be displayed but in that case it fails 

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You can do the same thing but instead of using 2 forms you use the 2 fields and show/hide them based on the form mode

  • Rutu1455 Profile Picture
    34 on at

    @Anonymous 

    If its not compulsory to use form you can use controls instead of form so you can do any changes and use patch function to save data in different mode using variables

  • Rutu1455 Profile Picture
    34 on at

    Hello @Anonymous 

    In form take two controls in datacard first one is Textinput and another one is dropdown on button click Set variable 

    Set(view,true) 

    On text Input controls visibility function  Add this : If(view=true,true,false) And on Dropdown control visibility function If(view=true,false,true) ,

    On second Button Set Variable Which Might be Edit Or View Set Set(view,false)

    If View variable has true value then  Input control  will be visible or else if view variable has value false then dropdown will be visible

    Rutu1455_0-1644234650804.pngRutu1455_1-1644234667089.png

     

    Set default of both control as per your requirement

     

    I Hope now your are clear ,

    like if its helpful,

    Thanks in advance

    Regards

    Rutuja Chavan

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Rutu1455 ,

    Almost was able to achieve the task, But still a small thing need to implemented. We I click on edit button I am setting a variable name Editform as true and when i click a add button i am setting a variable name Additem as true.

    Now when the additem is true form mode gets changed to New and able to get all the values from dropdown.

    To achieve this I am using the following formula,

    if(

    Var_Additem=true,

    sharepointlist.title,

    galmain.selected

    )

    Now i want implement the same condition when the editform is also true.

    How could i pass it in same if condition.

     

     

    Thanks in Advanced

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard