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

Default settings reverting when updating form

Hi,

 

I have a form with some default settings. This works well when the user is completing a new form, but when they are updating a form that they have completed on behalf of another employee, the form reverts the data.

TarenBhutch_1-1642376941285.png

**Note, employee names have been blocked and changes for privacy purposes.

 

I have a default set on a people picker for employee name (see below).

 

DefaultSelectedItems = { 

'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 

DisplayName:User().FullName, 

Claims:"i:0#.f|membership|" & Lower(User().Email), 

Department:"", 

Email:User().Email, 

JobTitle:"", 

Phone:Office365Users.UserProfileV2(User().Email).businessPhones,

Picture:User().Image,

Manager:""

}

 

 

How do I ensure the Employee Name does not change when they update the form?

 

Thanks in advanced.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @w1sd0m,

 

Unfortunately that came up with invalid errors. It didn't give much details which is annoying.

 

Previously, editing the form would open the original "NewItem" screen but have the item set to Gallery1.Selected . To get around this issue we added a new screen called "UpdateItem" that didn't have all original default functions on the fields.

 

TarenBhutch_0-1642561567248.png

 

 

I can probably revisit this issue during phase 2 of the release.

 

Thanks,

View solution in original post

2 REPLIES 2
w1sd0m
Advocate II
Advocate II

Set DefaultSelectedItems to:

If(
    Checkbox1.Value = true,
    {
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        DisplayName: User().FullName,
        Claims: "i:0#.f|membership|" & Lower(User().Email),
        Department: "",
        Email: User().Email,
        JobTitle: "",
        Phone: Office365Users.UserProfileV2(User().Email).businessPhones,
        Picture: User().Image,
        Manager: ""
    }.DisplayName,
    Checkbox1.Value = false,
    ThisItem.Person.DisplayName
)

Hi @w1sd0m,

 

Unfortunately that came up with invalid errors. It didn't give much details which is annoying.

 

Previously, editing the form would open the original "NewItem" screen but have the item set to Gallery1.Selected . To get around this issue we added a new screen called "UpdateItem" that didn't have all original default functions on the fields.

 

TarenBhutch_0-1642561567248.png

 

 

I can probably revisit this issue during phase 2 of the release.

 

Thanks,

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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,769)