cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ouryuusama
Frequent Visitor

During Edit, Fields Display Default Values Instead of Submitted Values

Hello, I am relatively new to Powerapps. I did a from which is integrated to my Sharepoint List. I have set default values for some fields for easier input during creation of item but still editable. My problem is after submission of an item and I try to edit a certain item from the list, the form displays the default values instead of the values I submitted. Looking forward to your kind assistance.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Ouryuusama ,

In the Default, you need to allow for the Mode of the Form

If(
   FormName.Mode = FormMode.New,
   "YourDefaultHere",
   Parent.Default
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

8 REPLIES 8
WarrenBelz
Super User
Super User

Hi @Ouryuusama ,

In the Default, you need to allow for the Mode of the Form

If(
   FormName.Mode = FormMode.New,
   "YourDefaultHere",
   Parent.Default
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

You mean I have to set this formula to the Default property of every field?

@Ouryuusama ,

If you want to have a different value on the particular control when the form is in New Mode (I assume that is what you want), yes. Also it may be DefaultSelectedItems (Combo Boxes) or DefaultDate (Date Pickers) with the first one being a little more complex.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

This > "Office365Users.MyProfile().GivenName" is set on the Default property of the datacardvalue. Should I set your formula on the default property of datacardvalue or the default property of the datacard? Please give example.

@Ouryuusama ,

You need to simply put back whatever was on the Control (not the data card) before you changed it, with the new value you want as the first part (as per my code supplied). This will be different on different control types.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Like this? I am getting an error.

キャプチャ.PNG

Figured it should be comma after FormMode.New

@Ouryuusama ,

Fixed on original - easy to miss by one key and not see it when no red lines to help . . .

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,360)