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
Solved! Go to Solution.
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
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
197 | |
67 | |
46 | |
36 | |
25 |
User | Count |
---|---|
239 | |
108 | |
89 | |
87 | |
66 |