cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samsam
Advocate II
Advocate II

Automatically assign current User ID/email to Sharelist list

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?

 

Q25a.PNG

 

Thanks in advance


Sam

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

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

View solution in original post

3 REPLIES 3

@samsam 

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.

v-siky-msft
Community Support
Community Support

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

@v-siky-msft Thank you ~ it works perfectly

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,055)