I know there are several posts about this but for some reason I am struggling with solving this one. First my setup: I am NOT using a standard form on the screen. I am using my own controls and then a Patch statement to save/update records. The combobox Items is: Office365Users.SearchUser({searchTerm:cmbRequestor.SearchText}).DisplayName. All is fine and well there. This combobox is patched back to a person field in a SharePoint list. In this field, only one person can be selected. I do not allow multiple selections.
I have a variable named CurrentMode which can be New, Edit, View, based on the current state of the application and the assumption made is that if the user is not CREATING a new record then they have searched for a record, the app stored the main ID in a variable and then a search gallery populates with the searched items. All I want to do is display the name that was saved in the SharePoint list record, but have the user be able to EDIT that name if necessary.
In the Defaults Section I have tried doing something like If(CurrentMode<>"New",Office365Users.SearchUser({searchTerm:ResultsGallery.Selected.Requestor}).DisplayName,false) but I keep getting some error about expecting a record value. I have also tried appending .value.DisplayName, but get the same.

Report
All responses (
Answers (