cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Soumiya15
Helper III
Helper III

Change the form based on new mode

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

8 REPLIES 8
Nogueira1306
Super User
Super User

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! 

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
Frequent Visitor

hello @Soumiya15 

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!!

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 

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

@Soumiya15 

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

Hello @Soumiya15 

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

 

 

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

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,276)