I have a form that when it is in new mode, I want to populate the name box with the current user. The name box is a combo box that pulls from our directory and lets you pick your name from the list. I have the current user's profile stored in a variable. The variable is set when the app starts ie: varUser, Office365Users.MyProfileV2(). I can get the name field to display the current user's name when I open the form in new mode with this code:
If(EditForm1.Mode = FormMode.New, {Value: varUser.displayName}, ThisItem.'Bureau Name')
It checks to make sure it is in new mode otherwise it plugs in the name from the record that is being edited. The form is used for both new and editing records.
The issue I have is that when I submit the form, the name does not save in the SharePoint list. I'm pretty sure it has to do with the fact that the column on the SharePoint list is a person/group type.
Any idea how to make this work?
Thanks!