cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
afernando
Kudo Kingpin
Kudo Kingpin

Form mode won't change

I'm trying to use the NewForm(Form1) and EditForm(Form1) formulas to set the mode of Form1 depending on the previous screen the user was on.  

I want the form to be on edit mode when the user navigates to the form from screen1 and on new mode when the user navigates from screen2.   

For some reason, mode of my form1 is always new and never change to edit. I also tried using ReserForm function and that also did not work. Please help!

 

Cheers,

Anton

1 ACCEPTED SOLUTION

Accepted Solutions

I think I got it sorted. Thanks fore your help 

View solution in original post

5 REPLIES 5
murali
Power Apps
Power Apps

How did you confirm the mode did not change? Are you checking Form1.Mode?

I have a label with the following function; 

 

Form1.Mode.New

 

This shows 1 if the mode is new and 0 if its on edit mode. 

 

Also I've set different values of some of the card values based on the mode of the form. I only get the values assigned to 'New' mode.

That gives the underlying value for New. What you instead want to do is check if the mode is New or Edit like

 

If(Form1.Mode = FormMode.New, "do what you want to do for NewMode", "do what you want to do for EditMode")

 

Hope this helps.

 

Murali

Here's my function assigned to one of the data card values;

 

If(Form1.Mode = FormMode.New, glryCounted.Selected.Pallet, glrySystemStock.Selected.Pallet)

 

I always get the value for glryCounted.Selected.Pallet and not glrySystemStock.Selected.Pallet. 

I think I got it sorted. Thanks fore your help 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

Top Solution Authors
Top Kudoed Authors
Users online (3,329)