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

Field defaults to my name when Update button clicked

When I click the Update button in my app the name in the person field is overwritten with my name when it's saved. Can someone help me make sense of what I need to do to write the name selected in the AssignedTo person field to my SP list? For the Admin view, AssignedTo is a Text Input. Here's the OnSelect of the Update button:

If(isAdmin,
Patch('IS Help Desk',LookUp('IS Help Desk',ID=SelectedTicket.ID),{

Priority:{Value:EditTicketScreenPriorityDropDown.SelectedText.Value},
Category:{Value:EditTicketScreenCategoryDropDown.SelectedText.Value},
TaskStatus:{Value: EditTicketScreenStatusDropdown.SelectedText.Value},
OData__x0025_Complete:EditTicketScreenCompletedSlider.Value/100,
AssignedTo:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|"& Lower(User().Email),
Department:"",
DisplayName:"",
Email:"",
JobTitle:"",
Picture:""
},
Description:EditTicketScreenDescriptionInput.Text
}),

Patch('IS Help Desk',LookUp('IS Help Desk',ID = SelectedTicket.ID),{
Priority:{Value:EditTicketScreenPriorityDropDown.SelectedText.Value},
Category:{Value:EditTicketScreenCategoryDropDown.SelectedText.Value},
Description:EditTicketScreenDescriptionInput.Text
}
));
Reset(EditTicketScreenCompletedSlider);
Reset(EditTicketScreenStatusDropdown);
Navigate(MyTicketsScreen,None)

1 ACCEPTED SOLUTION

Accepted Solutions
AlisterT
Advocate II
Advocate II

User().Email is the person running the app. If you want to use the person selected from a combo box then you need to reference that instead.

View solution in original post

2 REPLIES 2
AlisterT
Advocate II
Advocate II

User().Email is the person running the app. If you want to use the person selected from a combo box then you need to reference that instead.

pbrainard
Helper III
Helper III

Thanks Alister. I was thinking that was the case, but needed affirmation. Thank you.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

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 Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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