Hi,
I would like to assign the current user email/name to a comboBox of SharePoint List with 'Person and Group' type
I tried the below command, but it returns error.
May I know how can I assign the current user id to that field automatically?
Thanks in advance
Sam
Solved! Go to Solution.
Hi @samsam ,
Do you mean you want to set current user to the staff name field automatically?
You have to modify the DefaultSelectedItems property of combo box as below:
{
Claims:"i:0#.f|membership|" & User().Email,
Department:"",
DisplayName: User().FullName,
Email: "",
JobTitle:"",
Picture:""
}
Sik
We believe you get this error because Choices is not looking for a condition, it is looking for a column. In other words, looking for records where the data source StaffName column is equal to the current user full name is probably not a valid type of column, that needs to likely be put not as direct parameter of Choices. but rather be put somewhere else.
Hi @samsam ,
Do you mean you want to set current user to the staff name field automatically?
You have to modify the DefaultSelectedItems property of combo box as below:
{
Claims:"i:0#.f|membership|" & User().Email,
Department:"",
DisplayName: User().FullName,
Email: "",
JobTitle:"",
Picture:""
}
Sik
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |